package com.sg.service.biz.bff.impl;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollectionUtil;
import com.sg.common.util.CommonFunctionHelper;
import com.sg.common.util.RedisUtil;
import com.sg.dto.biz.bff.req.*;
import com.sg.dto.biz.bff.res.*;
import com.sg.dto.integration.app.BatchQueryVirtualOrgMemberBorderReqDto;
import com.sg.dto.integration.app.BatchQueryVirtualOrgMemberBorderRespDto;
import com.sg.dto.integration.app.QueryVirtualOrgMemberListComReqDto;
import com.sg.dto.integration.app.QueryVirtualOrgMemberListComRespDto;
import com.sg.service.biz.bff.InductionRecordService;
import com.wicket.okrapp.integration.VirtualOrgService;
import com.sg.common.exception.Assert;
import com.wicket.okrbff.common.exception.BizException;
import com.wicket.okrframework.integration.*;
import com.wicket.okrframework.integration.dto.*;
import org.apache.skywalking.apm.toolkit.trace.Tag;
import org.apache.skywalking.apm.toolkit.trace.Tags;
import org.apache.skywalking.apm.toolkit.trace.Trace;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.stream.Collectors;

/**
 * @author ：
 * @version 1.0
 * @date ：
 */
@Service
public class InductionRecordServiceImpl implements InductionRecordService {
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;
    @Resource
    com.sg.service.biz.framework.PowerService fwBasePowerClient;
    @Resource
    com.sg.service.biz.framework.DivineDataService divineDataClient;
    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;

    @Resource
    com.sg.service.biz.framework.InductionRecordService fwBaseInductionRecordClient;

    @Resource
    com.sg.service.biz.framework.PowerService fwBasePowerClient;
    @Resource
    com.sg.service.biz.framework.DivineDataService fwBaseDivineDataClient;
    private RedisUtil redisUtil;
    @Resource
    com.sg.service.biz.framework.PositionService fwBasePositionClient;
    @Resource
    com.sg.service.biz.framework.OrgService fwBaseOrgClient;
    @Resource
    com.sg.service.biz.app.VirtualOrgService fwAppVirtualOrgClient;

    /**
     * B1-查询员工就职记录列表（边界）[1344]
     * gen by moon at 8/31/2022, 5:25:16 PM
     */
    @Trace(operationName = "B1-查询员工就职记录列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryStaffInductionRecordListRespDto queryStaffInductionRecordList(BffQueryStaffInductionRecordListReqDto reqDto) {


        QueryInductionRecordListBorderRespDto queryInductionRecordListBorderRespDto_1 = null;
//步骤0: D1-3查询就职记录列表(边界) - queryInductionRecordListBorder
        QueryInductionRecordListBorderRespDto queryInductionRecordListBorderRespDto = null;
        QueryInductionRecordListBorderReqDto queryInductionRecordListBorderReqDto = new QueryInductionRecordListBorderReqDto();
        queryInductionRecordListBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:31367_1
        queryInductionRecordListBorderReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:31368_1
        if (reqDto != null) {
            queryInductionRecordListBorderReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//sourceId:31361_1
        }

        /*D1-3查询就职记录列表(边界)[1343]   */
        Assert.isNull(queryInductionRecordListBorderReqDto.getOriginalRoleMemberId(), "B1-查询员工就职记录列表（边界）-D1-3查询就职记录列表(边界)-身份人员ID不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getSubjectLifeCycle(), "B1-查询员工就职记录列表（边界）-D1-3查询就职记录列表(边界)-主体生命周期不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getSpaceId(), "B1-查询员工就职记录列表（边界）-D1-3查询就职记录列表(边界)-创建于空间ID不能为空", false);
        queryInductionRecordListBorderRespDto = fwBaseInductionRecordClient.queryInductionRecordListBorder(queryInductionRecordListBorderReqDto).getData();

        queryInductionRecordListBorderRespDto_1 = queryInductionRecordListBorderRespDto;

        BffQueryStaffInductionRecordListRespDto retData = new BffQueryStaffInductionRecordListRespDto();
        if (queryInductionRecordListBorderRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryInductionRecordListBorderRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:31374_1
        }


        return retData;
    }

    /**
     * B1-3查询部门下就职记录列表（边界）[1568]
     * gen by moon at 8/10/2022, 3:36:10 AM
     */
    @Trace(operationName = "B1-3查询部门下就职记录列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptInductionRecordListRespDto queryDeptInductionRecordList(BffQueryDeptInductionRecordListReqDto reqDto) {


        QueryDeptInductionRecordListRespDto queryDeptInductionRecordListRespDto_1 = null;
//步骤0: D1-3查询部门下就职记录列表（边界） - queryDeptInductionRecordList
        QueryDeptInductionRecordListRespDto queryDeptInductionRecordListRespDto = null;
        QueryDeptInductionRecordListReqDto queryDeptInductionRecordListReqDto = new QueryDeptInductionRecordListReqDto();
        if (reqDto != null) {
            queryDeptInductionRecordListReqDto.setDeptCode(reqDto.getDeptCode());//sourceId:46859_1
            queryDeptInductionRecordListReqDto.setDeptId(reqDto.getDeptId());//sourceId:46865_1
        }

        /*D1-3查询部门下就职记录列表（边界）[1569]   */
        Assert.isNull(queryDeptInductionRecordListReqDto.getDeptCode(), "B1-3查询部门下就职记录列表（边界）-D1-3查询部门下就职记录列表（边界）-部门标识不能为空", false);
        queryDeptInductionRecordListRespDto = fwBaseInductionRecordClient.queryDeptInductionRecordList(queryDeptInductionRecordListReqDto).getData();

        queryDeptInductionRecordListRespDto_1 = queryDeptInductionRecordListRespDto;

        BffQueryDeptInductionRecordListRespDto retData = new BffQueryDeptInductionRecordListRespDto();
        if (queryDeptInductionRecordListRespDto_1 != null) {
            retData.setStaffBeginMemberList(queryDeptInductionRecordListRespDto_1.getStaffBeginMemberList().stream().map(item -> BeanUtil.toBean(item, BffStaffBeginMemberDto.class)).collect(Collectors.toList()));//sourceId:46308_1
        }


        return retData;
    }

    /**
     * B1-2查询过滤后可选管理部门（管理）[1210]
     * gen by moon at 10/15/2022, 5:53:22 PM
     */
    @Trace(operationName = "B1-2查询过滤后可选管理部门（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryFilterAdminDeptDetailBorderRespDto queryFilterAdminDeptDetailBorder(BffQueryFilterAdminDeptDetailBorderReqDto reqDto) {


        BatchQueryDeptListRespDto batchQueryDeptListRespDto_3 = null;
        BatchQueryOrgListBorderRespDto batchQueryOrgListBorderRespDto_1 = null;
//步骤0: D1-3查询就职记录列表(边界) - queryInductionRecordListBorder
        QueryInductionRecordListBorderRespDto queryInductionRecordListBorderRespDto = null;
        QueryInductionRecordListBorderReqDto queryInductionRecordListBorderReqDto = new QueryInductionRecordListBorderReqDto();
        queryInductionRecordListBorderReqDto.setInductionUnitTypeCode("DEPT");//sourceId:31591_1
        queryInductionRecordListBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:31501_1
        queryInductionRecordListBorderReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:31503_1
        if (reqDto != null) {
            queryInductionRecordListBorderReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:31500_1
        }

        /*D1-3查询就职记录列表（查询所就职的部门列表）[1343]   */
        Assert.isNull(queryInductionRecordListBorderReqDto.getOriginalRoleMemberId(), "B1-2查询过滤后可选管理部门（管理）-D1-3查询就职记录列表（查询所就职的部门列表）-身份人员ID不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getInductionUnitTypeCode(), "B1-2查询过滤后可选管理部门（管理）-D1-3查询就职记录列表（查询所就职的部门列表）-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getSubjectLifeCycle(), "B1-2查询过滤后可选管理部门（管理）-D1-3查询就职记录列表（查询所就职的部门列表）-主体生命周期不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getSpaceId(), "B1-2查询过滤后可选管理部门（管理）-D1-3查询就职记录列表（查询所就职的部门列表）-创建于空间ID不能为空", false);
        queryInductionRecordListBorderRespDto = fwBaseInductionRecordClient.queryInductionRecordListBorder(queryInductionRecordListBorderReqDto).getData();


//步骤1: D1-3批量查询部门列表	 - batchQueryDeptList
        BatchQueryDeptListRespDto batchQueryDeptListRespDto = null;
        if (queryInductionRecordListBorderRespDto != null) {
            BatchQueryDeptListReqDto batchQueryDeptListReqDto = new BatchQueryDeptListReqDto();
            batchQueryDeptListReqDto.setLevelNumber(Long.valueOf(1));//CUSTOM_CONVENTION//sourceId:379258_1
            batchQueryDeptListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:379255_1
            if (queryInductionRecordListBorderRespDto != null) {
                batchQueryDeptListReqDto.setDeptList(queryInductionRecordListBorderRespDto.getOrgInductionRecordList().stream().map(item -> item.getEntityId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:379253_1
            }

            /*D1-3批量查询部门列表（过滤就职的一级部门）[1182]   */
            Assert.isNull(batchQueryDeptListReqDto.getLevelNumber(), "B1-2查询过滤后可选管理部门（管理）-D1-3批量查询部门列表（过滤就职的一级部门）-层级不能为空", false);
            Assert.isNull(batchQueryDeptListReqDto.getSubjectLifeCycle(), "B1-2查询过滤后可选管理部门（管理）-D1-3批量查询部门列表（过滤就职的一级部门）-主体生命周期不能为空", false);
            batchQueryDeptListRespDto = fwBaseOrgClient.batchQueryDeptList(batchQueryDeptListReqDto).getData();


        }

//步骤2: D1-2查管理的部门列表(边界) - queryManageDeptListBorder
        QueryManageDeptListBorderRespDto queryManageDeptListBorderRespDto = null;
        QueryManageDeptListBorderReqDto queryManageDeptListBorderReqDto = new QueryManageDeptListBorderReqDto();
        if (reqDto != null) {
            queryManageDeptListBorderReqDto.setRoleMemberId(reqDto.getRoleMemberId());//SimpleFieldAssign//sourceId:43661_1
        }

        /*D1-2查询管理的部门列表（已管理的部门列表）[1219]   */
        Assert.isNull(queryManageDeptListBorderReqDto.getRoleMemberId(), "B1-2查询过滤后可选管理部门（管理）-D1-2查询管理的部门列表（已管理的部门列表）-角色人员ID不能为空", false);
        queryManageDeptListBorderRespDto = fwBasePowerClient.queryManageDeptListBorder(queryManageDeptListBorderReqDto).getData();


//步骤3: D查询可用管理部门（特殊方法） - queryDeptCollectionRemoveExistingDataList
        QueryDeptCollectionRemoveExistingDataListRespDto queryDeptCollectionRemoveExistingDataListRespDto = null;
        if (batchQueryDeptListRespDto != null) {
            QueryDeptCollectionRemoveExistingDataListReqDto queryDeptCollectionRemoveExistingDataListReqDto = new QueryDeptCollectionRemoveExistingDataListReqDto();
            if (batchQueryDeptListRespDto != null && batchQueryDeptListRespDto.getDeptList() != null && !CollectionUtil.isEmpty(batchQueryDeptListRespDto.getDeptList())) {
                queryDeptCollectionRemoveExistingDataListReqDto.setOrgInductionRecordList(//objList-to-objLists
                        batchQueryDeptListRespDto.getDeptList().stream().map(item -> {
                            OrgInductionRecordDto elm = new OrgInductionRecordDto();
                            if (item != null) {
                                elm.setEntityId(item.getDeptId());//SimpleFieldAssign//sourceId:20761_2
                            }
                            return elm;
                        }).collect(Collectors.toList()));//objList-to-objLists//sourceId:43674_1
            }
            if (queryManageDeptListBorderRespDto != null && queryManageDeptListBorderRespDto.getManagedDeptList() != null && !CollectionUtil.isEmpty(queryManageDeptListBorderRespDto.getManagedDeptList())) {
                queryDeptCollectionRemoveExistingDataListReqDto.setManagedDeptList(queryManageDeptListBorderRespDto.getManagedDeptList().stream().map(item -> BeanUtil.toBean(item, ManagedDeptListDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:43675_1
            }

            /*查询可用管理部门（就职部门列表过滤掉已管理的部门列表）[1544]   */

            queryDeptCollectionRemoveExistingDataListRespDto = fwBaseDivineDataClient.queryDeptCollectionRemoveExistingDataList(queryDeptCollectionRemoveExistingDataListReqDto).getData();


        }

//步骤4: D1-3批量查询部门列表	 - batchQueryDeptList
        BatchQueryDeptListRespDto batchQueryDeptListRespDto_2 = null;
        if (queryDeptCollectionRemoveExistingDataListRespDto != null) {
            BatchQueryDeptListReqDto batchQueryDeptListReqDto_1 = new BatchQueryDeptListReqDto();
            batchQueryDeptListReqDto_1.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:379311_1
            if (queryDeptCollectionRemoveExistingDataListRespDto != null) {
                batchQueryDeptListReqDto_1.setDeptList(queryDeptCollectionRemoveExistingDataListRespDto.getOrgInductionRecordList().stream().map(item -> item.getEntityId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:379309_1
            }

            /*D1-3批量查询部门列表（查询可分配的部门信息）[1182]   */
            Assert.isNull(batchQueryDeptListReqDto_1.getSubjectLifeCycle(), "B1-2查询过滤后可选管理部门（管理）-D1-3批量查询部门列表（查询可分配的部门信息）-主体生命周期不能为空", false);
            batchQueryDeptListRespDto_2 = fwBaseOrgClient.batchQueryDeptList(batchQueryDeptListReqDto_1).getData();


            batchQueryDeptListRespDto_3 = batchQueryDeptListRespDto_2;
        }

//步骤5: D1-3批量查询组织列表 - batchQueryOrgListBorder
        BatchQueryOrgListBorderRespDto batchQueryOrgListBorderRespDto = null;
        if (batchQueryDeptListRespDto_2 != null) {
            BatchQueryOrgListBorderReqDto batchQueryOrgListBorderReqDto = new BatchQueryOrgListBorderReqDto();
            batchQueryOrgListBorderReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:379324_1
            if (batchQueryDeptListRespDto_2 != null) {
                batchQueryOrgListBorderReqDto.setOrgList(batchQueryDeptListRespDto_2.getDeptList().stream().map(item -> item.getOrganizationId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:379322_1
            }

            /*D1-3批量查询组织列表[2148]   */
            Assert.isNull(batchQueryOrgListBorderReqDto.getSpaceId(), "B1-2查询过滤后可选管理部门（管理）-D1-3批量查询组织列表-创建于空间ID不能为空", false);
            batchQueryOrgListBorderRespDto = fwBaseOrgClient.batchQueryOrgListBorder(batchQueryOrgListBorderReqDto).getData();


            batchQueryOrgListBorderRespDto_1 = batchQueryOrgListBorderRespDto;
        }

        BffQueryFilterAdminDeptDetailBorderRespDto retData = new BffQueryFilterAdminDeptDetailBorderRespDto();
        //数据集融合  MoreListToOneSource
        if (batchQueryDeptListRespDto_3 != null && !CollectionUtil.isEmpty(batchQueryDeptListRespDto_3.getDeptList())) {
            for (DeptDto deptDto : batchQueryDeptListRespDto_3.getDeptList()) {
                BffDeptDto retElm = new BffDeptDto();

                if (batchQueryDeptListRespDto_3 != null) {
                    retElm.setDeptId(deptDto.getDeptId());//SimpleFieldAssign//sourceId:107719_2
                    retElm.setOrganizationId(deptDto.getOrganizationId());//SimpleFieldAssign//sourceId:107720_2
                    retElm.setDeptName(deptDto.getDeptName());//SimpleFieldAssign//sourceId:107721_2
                }
                retData.getDeptList().add(retElm);
                if (batchQueryOrgListBorderRespDto_1 != null) {
                    for (OrgDto orgDto : batchQueryOrgListBorderRespDto_1.getOrgList()) {
                        if (orgDto.getOrganizationId().equals(deptDto.getOrganizationId())) {
                            if (batchQueryOrgListBorderRespDto_1 != null) {
                                retElm.setOrganizationName(orgDto.getOrganizationName());//SimpleFieldAssign//sourceId:107722_2
                            }
                        }
                    }
                }

            }
        }//sourceId:379325_1


        return retData;
    }

    /**
     * B1-3查询无组织架构就职记录列表（边界）[1700]
     * gen by moon at 8/31/2022, 5:25:20 PM
     */
    @Trace(operationName = "B1-3查询无组织架构就职记录列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryUnstructuredInductionRecordListBorderRespDto queryUnstructuredInductionRecordListBorder(BffQueryUnstructuredInductionRecordListBorderReqDto reqDto) {


        QueryUnstructuredInductionRecordListBorderRespDto queryUnstructuredInductionRecordListBorderRespDto_1 = null;
//步骤0: D1-3查询无组织架构就职记录列表（边界） - queryUnstructuredInductionRecordListBorder
        QueryUnstructuredInductionRecordListBorderRespDto queryUnstructuredInductionRecordListBorderRespDto = null;
        QueryUnstructuredInductionRecordListBorderReqDto queryUnstructuredInductionRecordListBorderReqDto = new QueryUnstructuredInductionRecordListBorderReqDto();
        if (reqDto != null) {
            queryUnstructuredInductionRecordListBorderReqDto.setIdCardName(reqDto.getIdCardName());//sourceId:50944_1
        }

        /*D1-3查询无组织架构就职记录列表（边界）[1702]   */

        queryUnstructuredInductionRecordListBorderRespDto = fwBaseInductionRecordClient.queryUnstructuredInductionRecordListBorder(queryUnstructuredInductionRecordListBorderReqDto).getData();

        queryUnstructuredInductionRecordListBorderRespDto_1 = queryUnstructuredInductionRecordListBorderRespDto;

        BffQueryUnstructuredInductionRecordListBorderRespDto retData = new BffQueryUnstructuredInductionRecordListBorderRespDto();
        if (queryUnstructuredInductionRecordListBorderRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryUnstructuredInductionRecordListBorderRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:50946_1
        }


        retData.setPageNum(queryUnstructuredInductionRecordListBorderRespDto.getPageNum());
        retData.setPageSize(queryUnstructuredInductionRecordListBorderRespDto.getPageSize());
        retData.setTotal(queryUnstructuredInductionRecordListBorderRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryUnstructuredInductionRecordListBorderRespDto.getTotalNum()) / Double.valueOf(queryUnstructuredInductionRecordListBorderRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B1-3查询直属就职记录列表（边界）[1843]
     * gen by moon at 10/16/2022, 2:56:43 AM
     */
    @Trace(operationName = "B1-3查询直属就职记录列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDirectInductionRecordListBorderRespDto queryDirectInductionRecordListBorder(BffQueryDirectInductionRecordListBorderReqDto reqDto) {


        QueryInductionRecordListBorderRespDto queryInductionRecordListBorderRespDto_1 = null;
//步骤0: D1-3查询就职记录列表(边界) - queryInductionRecordListBorder
        QueryInductionRecordListBorderRespDto queryInductionRecordListBorderRespDto = null;
        QueryInductionRecordListBorderReqDto queryInductionRecordListBorderReqDto = new QueryInductionRecordListBorderReqDto();
        queryInductionRecordListBorderReqDto.setInductionUnitTypeCode("DEPT");//sourceId:56563_1
        queryInductionRecordListBorderReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:56565_1
        queryInductionRecordListBorderReqDto.setIsArchive("FALSE");//sourceId:56569_1
        queryInductionRecordListBorderReqDto.setIsTransaction("FALSE");//sourceId:56573_1
        if (reqDto != null) {
            queryInductionRecordListBorderReqDto.setPositionType(reqDto.getPositionType());//SimpleFieldAssign//sourceId:85150_1
            queryInductionRecordListBorderReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:56568_1
        }

        /*D1-3查询就职记录列表（边界）[1343]   */
        Assert.isNull(queryInductionRecordListBorderReqDto.getEntityId(), "B1-3查询直属就职记录列表（边界）-D1-3查询就职记录列表（边界）-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getInductionUnitTypeCode(), "B1-3查询直属就职记录列表（边界）-D1-3查询就职记录列表（边界）-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getSubjectLifeCycle(), "B1-3查询直属就职记录列表（边界）-D1-3查询就职记录列表（边界）-主体生命周期不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getIsArchive(), "B1-3查询直属就职记录列表（边界）-D1-3查询就职记录列表（边界）-是否存档不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getIsTransaction(), "B1-3查询直属就职记录列表（边界）-D1-3查询就职记录列表（边界）-是否异动不能为空", false);
        queryInductionRecordListBorderRespDto = fwBaseInductionRecordClient.queryInductionRecordListBorder(queryInductionRecordListBorderReqDto).getData();


        queryInductionRecordListBorderRespDto_1 = queryInductionRecordListBorderRespDto;

        BffQueryDirectInductionRecordListBorderRespDto retData = new BffQueryDirectInductionRecordListBorderRespDto();
        if (queryInductionRecordListBorderRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryInductionRecordListBorderRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:56797_1
        }


        return retData;
    }

    /**
     * B1-3查询无组织架构就职记录列表[1792]
     * gen by moon at 8/31/2022, 5:25:21 PM
     */
    @Trace(operationName = "B1-3查询无组织架构就职记录列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryUnstructuredInductionRecordListRespDto queryUnstructuredInductionRecordList(BffQueryUnstructuredInductionRecordListReqDto reqDto) {


        QueryDirectInductionRecordListRespDto queryDirectInductionRecordListRespDto_1 = null;
//步骤0: D1-3查询直属就职记录列表 - queryDirectInductionRecordList
        QueryDirectInductionRecordListRespDto queryDirectInductionRecordListRespDto = null;
        QueryDirectInductionRecordListReqDto queryDirectInductionRecordListReqDto = new QueryDirectInductionRecordListReqDto();
        queryDirectInductionRecordListReqDto.setInductionUnitTypeCode("ORG");//sourceId:54467_1
        queryDirectInductionRecordListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:54471_1
        if (reqDto != null) {
            queryDirectInductionRecordListReqDto.setEntityId(reqDto.getEntityId());//sourceId:54468_1
        }

        /*D1-3查询直属就职记录列表[452]   */
        Assert.isNull(queryDirectInductionRecordListReqDto.getInductionUnitTypeCode(), "B1-3查询无组织架构就职记录列表-D1-3查询直属就职记录列表-就职单位类型实例不能为空", false);
        Assert.isNull(queryDirectInductionRecordListReqDto.getEntityId(), "B1-3查询无组织架构就职记录列表-D1-3查询直属就职记录列表-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryDirectInductionRecordListReqDto.getSubjectLifeCycle(), "B1-3查询无组织架构就职记录列表-D1-3查询直属就职记录列表-主体生命周期不能为空", false);
        queryDirectInductionRecordListRespDto = fwBaseInductionRecordClient.queryDirectInductionRecordList(queryDirectInductionRecordListReqDto).getData();

        queryDirectInductionRecordListRespDto_1 = queryDirectInductionRecordListRespDto;

        BffQueryUnstructuredInductionRecordListRespDto retData = new BffQueryUnstructuredInductionRecordListRespDto();
        if (queryDirectInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryDirectInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:54475_1
        }


        return retData;
    }

    /**
     * B1-3查询更新的就职记录列表（管理）[1534]
     */
    @Trace(operationName = "B1-3查询更新的就职记录列表（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryUpdatedInductionListRespDto queryUpdatedInductionList(BffQueryUpdatedInductionListReqDto reqDto) {


        //步骤0: D1-3查询更新的就职记录列表 - queryUpdatedInductionList
        QueryUpdatedInductionListRespDto queryUpdatedInductionListRespDto = null;
        QueryUpdatedInductionListReqDto queryUpdatedInductionListReqDto = new QueryUpdatedInductionListReqDto();
        queryUpdatedInductionListReqDto.setIsUpdate("TRUE");//sourceId:43637_1
        if (reqDto != null) {
            queryUpdatedInductionListReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:43636_1
        }

        /*D1-3查询更新的就职记录列表[1535]   */
        queryUpdatedInductionListRespDto = fwBaseInductionRecordClient.queryUpdatedInductionList(queryUpdatedInductionListReqDto).getData();


        BffQueryUpdatedInductionListRespDto retData = new BffQueryUpdatedInductionListRespDto();
        retData.setOrgInductionRecordList(queryUpdatedInductionListRespDto.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:63294_1


        return retData;
    }

    /**
     * B1-3一键更新职务信息（管理-勿删）
     */
    @Trace(operationName = "B1-3一键更新职务信息（管理-勿删）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchUpdateInductionRecordRespDto batchUpdateInductionRecord(BffBatchUpdateInductionRecordReqDto reqDto) {


        //步骤0: D1-3一键更新职务信息 - batchUpdateInductionRecord
        BatchUpdateInductionRecordRespDto batchUpdateInductionRecordRespDto = null;
        BatchUpdateInductionRecordReqDto batchUpdateInductionRecordReqDto = new BatchUpdateInductionRecordReqDto();


        /*D1-3一键更新职务信息[1785]   */
        batchUpdateInductionRecordRespDto = fwBaseInductionRecordClient.batchUpdateInductionRecord(batchUpdateInductionRecordReqDto).getData();


        BffBatchUpdateInductionRecordRespDto retData = new BffBatchUpdateInductionRecordRespDto();


        return retData;
    }

    /**
     * B1-3补充就职记录其它信息（管理）[1465]
     * gen by moon at 8/31/2022, 5:25:18 PM
     */
    @Trace(operationName = "B1-3补充就职记录其它信息（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffPerfectPostGradesInfoRespDto perfectPostGradesInfo(BffPerfectPostGradesInfoReqDto reqDto) {


        //步骤0: D1-3修改就职记录 - updateInductionRecord
        UpdateInductionRecordRespDto updateInductionRecordRespDto = null;
        UpdateInductionRecordReqDto updateInductionRecordReqDto = new UpdateInductionRecordReqDto();
        if (reqDto != null) {
            updateInductionRecordReqDto.setInductionRecordId(reqDto.getInductionRecordId());//sourceId:36517_1
            updateInductionRecordReqDto.setInductionStartTime(reqDto.getInductionStartTime());//sourceId:36539_1
            updateInductionRecordReqDto.setStationGradeId(reqDto.getStationGradeId());//sourceId:36530_1
            updateInductionRecordReqDto.setStationGradeName(reqDto.getStationGradeName());//sourceId:36531_1
        }

        /*D1-3修改就职记录[777]   */
        Assert.isNull(updateInductionRecordReqDto.getInductionRecordId(), "B1-3补充就职记录其它信息（管理）-D1-3修改就职记录-就职记录ID不能为空", false);
        updateInductionRecordRespDto = fwBaseInductionRecordClient.updateInductionRecord(updateInductionRecordReqDto).getData();


        BffPerfectPostGradesInfoRespDto retData = new BffPerfectPostGradesInfoRespDto();


        return retData;
    }

    /**
     * B1-3查询非直属就职记录列表[1263]
     * gen by moon at 8/31/2022, 5:25:14 PM
     */
    @Trace(operationName = "B1-3查询非直属就职记录列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryUndoDirectInductionRecordListRespDto queryUndoDirectInductionRecordList(BffQueryUndoDirectInductionRecordListReqDto reqDto) {


        QueryUndoDirectInductionRecordListRespDto queryUndoDirectInductionRecordListRespDto_1 = null;
//步骤0: D1-3查询非直属就职记录列表 - queryUndoDirectInductionRecordList
        QueryUndoDirectInductionRecordListRespDto queryUndoDirectInductionRecordListRespDto = null;
        QueryUndoDirectInductionRecordListReqDto queryUndoDirectInductionRecordListReqDto = new QueryUndoDirectInductionRecordListReqDto();
        queryUndoDirectInductionRecordListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:38749_1
        if (reqDto != null) {
            queryUndoDirectInductionRecordListReqDto.setParentDeptId(reqDto.getParentDeptId());//sourceId:38746_1
        }

        /*D1-3查询非直属就职记录列表[1476]   */
        Assert.isNull(queryUndoDirectInductionRecordListReqDto.getParentDeptId(), "B1-3查询非直属就职记录列表-D1-3查询非直属就职记录列表-父级部门ID不能为空", false);
        Assert.isNull(queryUndoDirectInductionRecordListReqDto.getSubjectLifeCycle(), "B1-3查询非直属就职记录列表-D1-3查询非直属就职记录列表-主体生命周期不能为空", false);
        queryUndoDirectInductionRecordListRespDto = fwBaseInductionRecordClient.queryUndoDirectInductionRecordList(queryUndoDirectInductionRecordListReqDto).getData();

        queryUndoDirectInductionRecordListRespDto_1 = queryUndoDirectInductionRecordListRespDto;

        BffQueryUndoDirectInductionRecordListRespDto retData = new BffQueryUndoDirectInductionRecordListRespDto();
        if (queryUndoDirectInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryUndoDirectInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:50974_1
        }


        return retData;
    }

    /**
     * B1-3调岗就职记录（管理）[1059]
     * gen by moon at 9/23/2023, 11:46:55 AM
     */
    @Trace(operationName = "B1-3调岗就职记录（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffPostTransferInductionRecordRespDto postTransferInductionRecord(BffPostTransferInductionRecordReqDto reqDto) {


        PostTransferInductionRecordRespDto postTransferInductionRecordRespDto_1 = null;
//步骤0: D1-3调岗就职记录 - postTransferInductionRecord
        PostTransferInductionRecordRespDto postTransferInductionRecordRespDto = null;
        PostTransferInductionRecordReqDto postTransferInductionRecordReqDto = new PostTransferInductionRecordReqDto();
        if (reqDto != null) {
            postTransferInductionRecordReqDto.setInductionUnitTypeCode(reqDto.getInductionUnitTypeCode());//SimpleFieldAssign//sourceId:51436_1
            postTransferInductionRecordReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:37478_1
            postTransferInductionRecordReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:37479_1
            postTransferInductionRecordReqDto.setUserId(reqDto.getUserId());//SimpleFieldAssign//sourceId:37480_1
            postTransferInductionRecordReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:37481_1
            postTransferInductionRecordReqDto.setOrganizationName(reqDto.getOrganizationName());//SimpleFieldAssign//sourceId:37482_1
            postTransferInductionRecordReqDto.setDeptShortName(reqDto.getDeptShortName());//SimpleFieldAssign//sourceId:37483_1
            postTransferInductionRecordReqDto.setFirstLetter(reqDto.getFirstLetter());//SimpleFieldAssign//sourceId:37484_1
            postTransferInductionRecordReqDto.setIsCustomPosition(reqDto.getIsCustomPosition());//SimpleFieldAssign//sourceId:37487_1
            postTransferInductionRecordReqDto.setPositionType(reqDto.getPositionType());//SimpleFieldAssign//sourceId:37488_1
            postTransferInductionRecordReqDto.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:51342_1
            postTransferInductionRecordReqDto.setPositionId(reqDto.getPositionId());//SimpleFieldAssign//sourceId:37490_1
            postTransferInductionRecordReqDto.setPositionIdNameId(reqDto.getPositionIdNameId());//SimpleFieldAssign//sourceId:37491_1
            postTransferInductionRecordReqDto.setPositionIdName(reqDto.getPositionIdName());//SimpleFieldAssign//sourceId:37492_1
            postTransferInductionRecordReqDto.setDirectorInductionRecordId(reqDto.getDirectorInductionRecordId());//SimpleFieldAssign//sourceId:37493_1
            postTransferInductionRecordReqDto.setInductionStartTime(reqDto.getInductionStartTime());//SimpleFieldAssign//sourceId:37494_1
            postTransferInductionRecordReqDto.setInductionEndTime(reqDto.getInductionEndTime());//SimpleFieldAssign//sourceId:37497_1
            postTransferInductionRecordReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:37496_1
            postTransferInductionRecordReqDto.setIsPartTimeStaffing(reqDto.getIsPartTimeStaffing());//SimpleFieldAssign//sourceId:51434_1
            postTransferInductionRecordReqDto.setIsDirector(reqDto.getIsDirector());//SimpleFieldAssign//sourceId:247091_1
            postTransferInductionRecordReqDto.setIsXzDirector(reqDto.getIsXzDirector());//SimpleFieldAssign//sourceId:1132553_1
        }

        /*D1-3调岗就职记录[1471]   */
        Assert.isNull(postTransferInductionRecordReqDto.getInductionUnitTypeCode(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-就职单位类型实例不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getEntityId(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-就职单位对象实例ID不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getOriginalRoleMemberId(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-身份人员ID不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getUserId(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-个人账号ID不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getOrganizationId(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-组织ID不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getOrganizationName(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-冗余组织名称不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getDeptShortName(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-冗余部门名称不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getFirstLetter(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-备注首位字母不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getIsCustomPosition(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-是否自定义职务不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getPositionType(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-职务性质不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getOrderNumber(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-排序不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getPositionIdName(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-必选冗余职务名称不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getInductionEndTime(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-就职结束时间不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getInductionRecordId(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-就职记录ID不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getIsPartTimeStaffing(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-是否兼职编制不能为空", false);
        Assert.isNull(postTransferInductionRecordReqDto.getIsDirector(), "B1-3调岗就职记录（管理）-D1-3调岗就职记录-是否主管不能为空", false);
        postTransferInductionRecordRespDto = fwBaseInductionRecordClient.postTransferInductionRecord(postTransferInductionRecordReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        postTransferInductionRecordRespDto_1 = postTransferInductionRecordRespDto;

        BffPostTransferInductionRecordRespDto retData = new BffPostTransferInductionRecordRespDto();
        if (postTransferInductionRecordRespDto_1 != null) {
            retData.setInductionRecordId(postTransferInductionRecordRespDto_1.getInductionRecordId());//SimpleFieldAssign//sourceId:37520_1
        }


        return retData;
    }

    /**
     * B1-3补充系统职务（管理）[1058]
     * gen by moon at 8/10/2022, 3:32:07 AM
     */
    @Trace(operationName = "B1-3补充系统职务（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffPerfectSystemPositionRespDto perfectSystemPosition(BffPerfectSystemPositionReqDto reqDto) {


        //步骤0: D1-3补充系统职务（边界） - perfectSystemPosition
        PerfectSystemPositionRespDto perfectSystemPositionRespDto = null;
        PerfectSystemPositionReqDto perfectSystemPositionReqDto = new PerfectSystemPositionReqDto();
        if (reqDto != null) {
            perfectSystemPositionReqDto.setInductionRecordId(reqDto.getInductionRecordId());//sourceId:36631_1
            perfectSystemPositionReqDto.setPositionId(reqDto.getPositionId());//sourceId:36632_1
            perfectSystemPositionReqDto.setPositionIdNameId(reqDto.getPositionIdNameId());//sourceId:36633_1
            perfectSystemPositionReqDto.setPositionIdName(reqDto.getPositionIdName());//sourceId:36634_1
            perfectSystemPositionReqDto.setPositionType(reqDto.getPositionType());//sourceId:36635_1
            perfectSystemPositionReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//sourceId:105199_1
            perfectSystemPositionReqDto.setInductionUnitTypeCode(reqDto.getInductionUnitTypeCode());//sourceId:51527_1
            perfectSystemPositionReqDto.setEntityId(reqDto.getEntityId());//sourceId:51528_1
            perfectSystemPositionReqDto.setIsPartTimeStaffing(reqDto.getIsPartTimeStaffing());//sourceId:51516_1
        }

        /*D1-3补充系统职务（边界）[1468]   */
        Assert.isNull(perfectSystemPositionReqDto.getInductionRecordId(), "B1-3补充系统职务（管理）-D1-3补充系统职务（边界）-就职记录ID不能为空", false);
        Assert.isNull(perfectSystemPositionReqDto.getPositionId(), "B1-3补充系统职务（管理）-D1-3补充系统职务（边界）-冗余可选职务ID不能为空", false);
        Assert.isNull(perfectSystemPositionReqDto.getPositionIdNameId(), "B1-3补充系统职务（管理）-D1-3补充系统职务（边界）-冗余职务名称ID不能为空", false);
        Assert.isNull(perfectSystemPositionReqDto.getOriginalRoleMemberId(), "B1-3补充系统职务（管理）-D1-3补充系统职务（边界）-身份人员ID不能为空", false);
        Assert.isNull(perfectSystemPositionReqDto.getInductionUnitTypeCode(), "B1-3补充系统职务（管理）-D1-3补充系统职务（边界）-就职单位类型实例不能为空", false);
        Assert.isNull(perfectSystemPositionReqDto.getEntityId(), "B1-3补充系统职务（管理）-D1-3补充系统职务（边界）-就职单位对象实例ID不能为空", false);
        Assert.isNull(perfectSystemPositionReqDto.getIsPartTimeStaffing(), "B1-3补充系统职务（管理）-D1-3补充系统职务（边界）-是否兼职编制不能为空", false);
        perfectSystemPositionRespDto = fwBaseInductionRecordClient.perfectSystemPosition(perfectSystemPositionReqDto).getData();


        BffPerfectSystemPositionRespDto retData = new BffPerfectSystemPositionRespDto();


        return retData;
    }

    /**
     * B1-3查询就职记录列表（边界）[1050]
     * gen by moon at 8/10/2022, 3:32:00 AM
     */
    @Trace(operationName = "B1-3查询就职记录列表（边界）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryInductionRecordListBorderRespDto queryInductionRecordListBorder(BffQueryInductionRecordListBorderReqDto reqDto) {


        QueryInductionRecordListBorderRespDto queryInductionRecordListBorderRespDto_1 = null;
//步骤0: D1-3查询就职记录列表（边界） - queryInductionRecordListBorder
        QueryInductionRecordListBorderRespDto queryInductionRecordListBorderRespDto = null;
        QueryInductionRecordListBorderReqDto queryInductionRecordListBorderReqDto = new QueryInductionRecordListBorderReqDto();
        queryInductionRecordListBorderReqDto.setInductionUnitTypeCode("DEPT");//sourceId:35535_1
        queryInductionRecordListBorderReqDto.setArchivngType("NOT_ARCHIVE");//sourceId:35977_1
        queryInductionRecordListBorderReqDto.setIsTransaction("FALSE");//sourceId:51222_1
        if (reqDto != null) {
            queryInductionRecordListBorderReqDto.setEntityId(reqDto.getEntityId());//sourceId:35540_1
        }

        /*D1-3查询就职记录列表（边界）[1343]   */
        Assert.isNull(queryInductionRecordListBorderReqDto.getInductionUnitTypeCode(), "B1-3查询就职记录列表（边界）-D1-3查询就职记录列表（边界）-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListBorderReqDto.getArchivngType(), "B1-3查询就职记录列表（边界）-D1-3查询就职记录列表（边界）-存档类型不能为空", false);
        queryInductionRecordListBorderRespDto = fwBaseInductionRecordClient.queryInductionRecordListBorder(queryInductionRecordListBorderReqDto).getData();


        queryInductionRecordListBorderRespDto = fwBaseInductionRecordClient.queryInductionRecordListBorder(queryInductionRecordListBorderReqDto)


        queryInductionRecordListBorderRespDto_1 = queryInductionRecordListBorderRespDto;

        BffQueryInductionRecordListBorderRespDto retData = new BffQueryInductionRecordListBorderRespDto();
        if (queryInductionRecordListBorderRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryInductionRecordListBorderRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:35545_1
        }


        retData.setPageNum(queryInductionRecordListBorderRespDto.getPageNum());
        retData.setPageSize(queryInductionRecordListBorderRespDto.getPageSize());
        retData.setTotal(queryInductionRecordListBorderRespDto.getTotalNum());
        retData.setIsLastPage((Math.ceil(Double.valueOf(queryInductionRecordListBorderRespDto.getTotalNum()) / Double.valueOf(queryInductionRecordListBorderRespDto.getPageSize()))) <= retData.getPageNum());


        return retData;
    }

    /**
     * B1-3查询非直属就职记录列表（管理）[1049]
     * gen by moon at 8/20/2022, 5:59:40 PM
     */
    @Trace(operationName = "B1-3查询非直属就职记录列表（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryUndoDirectInductionRecordMgtListRespDto queryUndoDirectInductionRecordMgtList(BffQueryUndoDirectInductionRecordMgtListReqDto reqDto) {


        QueryUndoDirectInductionRecordListRespDto queryUndoDirectInductionRecordListRespDto_1 = null;
//步骤0: D1-3查询非直属就职记录列表 - queryUndoDirectInductionRecordList
        QueryUndoDirectInductionRecordListRespDto queryUndoDirectInductionRecordListRespDto = null;
        QueryUndoDirectInductionRecordListReqDto queryUndoDirectInductionRecordListReqDto = new QueryUndoDirectInductionRecordListReqDto();
        queryUndoDirectInductionRecordListReqDto.setIsArchive("FALSE");//sourceId:38734_1
        if (reqDto != null) {
            queryUndoDirectInductionRecordListReqDto.setParentDeptId(reqDto.getParentDeptId());//sourceId:38226_1
        }

        /*D1-3查询非直属就职记录列表[1476]   */
        Assert.isNull(queryUndoDirectInductionRecordListReqDto.getParentDeptId(), "B1-3查询非直属就职记录列表（管理）-D1-3查询非直属就职记录列表-父级部门ID不能为空", false);
        queryUndoDirectInductionRecordListRespDto = fwBaseInductionRecordClient.queryUndoDirectInductionRecordList(queryUndoDirectInductionRecordListReqDto).getData();

        queryUndoDirectInductionRecordListRespDto_1 = queryUndoDirectInductionRecordListRespDto;

        BffQueryUndoDirectInductionRecordMgtListRespDto retData = new BffQueryUndoDirectInductionRecordMgtListRespDto();
        if (queryUndoDirectInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryUndoDirectInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:38229_1
        }


        return retData;
    }

    /**
     * B1-3存档就职记录（管理）[968]
     * gen by moon at 9/23/2023, 11:46:52 AM
     */
    @Trace(operationName = "B1-3存档就职记录（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffToArchiveInductionRecordRespDto toArchiveInductionRecord(BffToArchiveInductionRecordReqDto reqDto) {


        //virtualUsage D1分析就职记录想存档操作条件  48705
        ImplementAnalyseInductionRecordLifecyCycleOperationTermRespDto implementAnalyseInductionRecordLifecyCycleOperationTermRespDto = null;
        ImplementAnalyseInductionRecordLifecyCycleOperationTermReqDto implementAnalyseInductionRecordLifecyCycleOperationTermReqDto = new ImplementAnalyseInductionRecordLifecyCycleOperationTermReqDto();
        implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.setLifecyCycleOperationType("ARCHIVE");//sourceId:1128735_1_48705
        if (reqDto != null) {
            implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:1128734_1_48705
        }

        /*D1分析就职记录想存档操作条件[7431]   */
        Assert.isNull(implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.getInductionRecordId(), "B1-3存档就职记录（管理）-D1分析就职记录想存档操作条件-就职记录ID不能为空", false);
        Assert.isNull(implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.getLifecyCycleOperationType(), "B1-3存档就职记录（管理）-D1分析就职记录想存档操作条件-生命周期操作类型不能为空", false);
        implementAnalyseInductionRecordLifecyCycleOperationTermRespDto = fwBaseInductionRecordClient.implementAnalyseInductionRecordLifecyCycleOperationTerm(implementAnalyseInductionRecordLifecyCycleOperationTermReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((implementAnalyseInductionRecordLifecyCycleOperationTermRespDto != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse() != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse().equals("TRUE"))) {
            //if(D1分析就职记录想存档操作条件.是否允许就职记录生命周期操作 等于 是)  48706

            ArchiveInductionRecordRespDto archiveInductionRecordRespDto = null;
            ArchiveInductionRecordReqDto archiveInductionRecordReqDto = new ArchiveInductionRecordReqDto();
            if (reqDto != null) {
                archiveInductionRecordReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:38151_1_48707
                archiveInductionRecordReqDto.setInductionEndTime(reqDto.getInductionEndTime());//SimpleFieldAssign//sourceId:38152_1_48707
            }

            /*D1-3存档就职记录[1473]   */
            Assert.isNull(archiveInductionRecordReqDto.getInductionRecordId(), "B1-3存档就职记录（管理）-D1-3存档就职记录-就职记录ID不能为空", false);
            Assert.isNull(archiveInductionRecordReqDto.getInductionEndTime(), "B1-3存档就职记录（管理）-D1-3存档就职记录-就职结束时间不能为空", false);
            archiveInductionRecordRespDto = fwBaseInductionRecordClient.archiveInductionRecord(archiveInductionRecordReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        } else if ((implementAnalyseInductionRecordLifecyCycleOperationTermRespDto != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse() != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse().equals("FALSE"))) {
            //elseif(D1分析就职记录想存档操作条件.是否允许就职记录生命周期操作 等于 否)  48708

//异常结束 48899
            throw new BizException("10300256", "对不起！当前员工为主岗位，请设新岗位后再试~", false);
        }
        BffToArchiveInductionRecordRespDto retData = new BffToArchiveInductionRecordRespDto();


        return retData;
    }

    /**
     * B1-3查询部门直属就职记录列表[794]
     * gen by moon at 8/31/2022, 5:25:07 PM
     */
    @Trace(operationName = "B1-3查询部门直属就职记录列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDirectInductionRecordListRespDto queryDirectInductionRecordList(BffQueryDirectInductionRecordListReqDto reqDto) {


        QueryDirectInductionRecordListRespDto queryDirectInductionRecordListRespDto_1 = null;
//步骤0: D1-3查询直属就职记录列表 - queryDirectInductionRecordList
        QueryDirectInductionRecordListRespDto queryDirectInductionRecordListRespDto = null;
        QueryDirectInductionRecordListReqDto queryDirectInductionRecordListReqDto = new QueryDirectInductionRecordListReqDto();
        queryDirectInductionRecordListReqDto.setInductionUnitTypeCode("DEPT");//sourceId:38741_1
        queryDirectInductionRecordListReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:38745_1
        if (reqDto != null) {
            queryDirectInductionRecordListReqDto.setEntityId(reqDto.getEntityId());//sourceId:38742_1
        }

        /*D1-3查询直属就职记录列表[452]   */
        Assert.isNull(queryDirectInductionRecordListReqDto.getInductionUnitTypeCode(), "B1-3查询部门直属就职记录列表-D1-3查询直属就职记录列表-就职单位类型实例不能为空", false);
        Assert.isNull(queryDirectInductionRecordListReqDto.getEntityId(), "B1-3查询部门直属就职记录列表-D1-3查询直属就职记录列表-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryDirectInductionRecordListReqDto.getSubjectLifeCycle(), "B1-3查询部门直属就职记录列表-D1-3查询直属就职记录列表-主体生命周期不能为空", false);
        queryDirectInductionRecordListRespDto = fwBaseInductionRecordClient.queryDirectInductionRecordList(queryDirectInductionRecordListReqDto).getData();

        queryDirectInductionRecordListRespDto_1 = queryDirectInductionRecordListRespDto;

        BffQueryDirectInductionRecordListRespDto retData = new BffQueryDirectInductionRecordListRespDto();
        if (queryDirectInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryDirectInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:38989_1
        }


        return retData;
    }

    /**
     * B1-3查询个人就职记录信息详情[795]
     * gen by moon at 9/7/2022, 3:58:47 PM
     */
    @Trace(operationName = "B1-3查询个人就职记录信息详情")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryInductionRecordInfoDetailRespDto queryInductionRecordInfoDetail(BffQueryInductionRecordInfoDetailReqDto reqDto) {


        QueryInductionRecordDetailRespDto queryInductionRecordDetailRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_3 = null;
//步骤0: D1-3查询就职记录详情 - queryInductionRecordDetail
        QueryInductionRecordDetailRespDto queryInductionRecordDetailRespDto = null;
        QueryInductionRecordDetailReqDto queryInductionRecordDetailReqDto = new QueryInductionRecordDetailReqDto();
        if (reqDto != null) {
            queryInductionRecordDetailReqDto.setInductionRecordId(reqDto.getInductionRecordId());//sourceId:38580_1
        }

        /*D1-3查询就职记录详情[405]   */
        Assert.isNull(queryInductionRecordDetailReqDto.getInductionRecordId(), "B1-3查询个人就职记录信息详情-D1-3查询就职记录详情-就职记录ID不能为空", false);
        queryInductionRecordDetailRespDto = fwBaseInductionRecordClient.queryInductionRecordDetail(queryInductionRecordDetailReqDto).getData();


        queryInductionRecordDetailRespDto_1 = queryInductionRecordDetailRespDto;

//步骤1: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
        if (queryInductionRecordDetailRespDto != null && queryInductionRecordDetailRespDto_1.getReportChargeInductionRecordId() != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto = new QueryInductionRecordInfoDetailComReqDto();
            if (queryInductionRecordDetailRespDto != null) {
                queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryInductionRecordDetailRespDto.getReportChargeInductionRecordId());//sourceId:38613_1
            }

            /*D1-3查询个人就职记录（查汇报主管名）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(), "B1-3查询个人就职记录信息详情-D1-3查询个人就职记录（查汇报主管名）-就职记录ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData();


            queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
        }

//步骤2: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_2 = null;
        if (queryInductionRecordDetailRespDto != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto_1 = new QueryInductionRecordInfoDetailComReqDto();
            if (queryInductionRecordDetailRespDto != null) {
                queryInductionRecordInfoDetailComReqDto_1.setInductionRecordId(queryInductionRecordDetailRespDto.getOperationInductionId());//sourceId:38619_1
            }

            /*D1-3查询个人就职记录（查操作人名）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto_1.getInductionRecordId(), "B1-3查询个人就职记录信息详情-D1-3查询个人就职记录（查操作人名）-就职记录ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto_2 = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto_1).getData();


            queryInductionRecordInfoDetailComRespDto_3 = queryInductionRecordInfoDetailComRespDto_2;
        }

        BffQueryInductionRecordInfoDetailRespDto retData = new BffQueryInductionRecordInfoDetailRespDto();
        if (queryInductionRecordDetailRespDto_1 != null) {
            retData.setInductionRecordId(queryInductionRecordDetailRespDto_1.getInductionRecordId());//sourceId:38634_1
            retData.setOriginalRoleMemberId(queryInductionRecordDetailRespDto_1.getOriginalRoleMemberId());//sourceId:38635_1
            retData.setUserId(queryInductionRecordDetailRespDto_1.getUserId());//sourceId:38636_1
            retData.setUserFace(queryInductionRecordDetailRespDto_1.getUserFace());//sourceId:38637_1
            retData.setIdCardName(queryInductionRecordDetailRespDto_1.getIdCardName());//sourceId:38638_1
            retData.setNickName(queryInductionRecordDetailRespDto_1.getNickName());//sourceId:38639_1
            retData.setSex(queryInductionRecordDetailRespDto_1.getSex());//sourceId:38640_1
            retData.setRoleMemberCode(queryInductionRecordDetailRespDto_1.getRoleMemberCode());//sourceId:38641_1
            retData.setRelaMemo(queryInductionRecordDetailRespDto_1.getRelaMemo());//sourceId:38643_1
            retData.setFirstLetter(queryInductionRecordDetailRespDto_1.getFirstLetter());//sourceId:38648_1
            retData.setIsMainInduction(queryInductionRecordDetailRespDto_1.getIsMainInduction());//sourceId:38649_1
            retData.setIsDirector(queryInductionRecordDetailRespDto_1.getIsDirector());//sourceId:247256_1
            retData.setIsCustomPosition(queryInductionRecordDetailRespDto_1.getIsCustomPosition());//sourceId:38650_1
            retData.setPositionType(queryInductionRecordDetailRespDto_1.getPositionType());//sourceId:38651_1
            retData.setStaffingId(queryInductionRecordDetailRespDto_1.getStaffingId());//sourceId:38652_1
            retData.setInductionStartTime(queryInductionRecordDetailRespDto_1.getInductionStartTime());//sourceId:38662_1
            retData.setPositionIdName(queryInductionRecordDetailRespDto_1.getPositionIdName());//sourceId:38653_1
            retData.setPositionId(queryInductionRecordDetailRespDto_1.getPositionId());//sourceId:38654_1
            retData.setPositionGradeName(queryInductionRecordDetailRespDto_1.getPositionGradeName());//sourceId:38655_1
            retData.setTypeDictionaryName(queryInductionRecordDetailRespDto_1.getTypeDictionaryName());//sourceId:38656_1
            retData.setStationName(queryInductionRecordDetailRespDto_1.getStationName());//sourceId:38657_1
            retData.setPostName(queryInductionRecordDetailRespDto_1.getPostName());//sourceId:38658_1
            retData.setStationTypeName(queryInductionRecordDetailRespDto_1.getStationTypeName());//sourceId:38659_1
            retData.setStationGradeName(queryInductionRecordDetailRespDto_1.getStationGradeName());//sourceId:38660_1
            retData.setOrganizationId(queryInductionRecordDetailRespDto_1.getOrganizationId());//sourceId:38644_1
            retData.setOrganizationName(queryInductionRecordDetailRespDto_1.getOrganizationName());//sourceId:38645_1
            retData.setCurrentDeptId(queryInductionRecordDetailRespDto_1.getEntityId());//sourceId:197841_1
            retData.setCurrentDeptName(queryInductionRecordDetailRespDto_1.getDeptShortName());//sourceId:197842_1
            retData.setChargeDeptId(queryInductionRecordDetailRespDto_1.getDeptId());//sourceId:197843_1
            retData.setChargeDeptName(queryInductionRecordDetailRespDto_1.getDeptName());//sourceId:197844_1
            retData.setReportChargeInductionRecordId(queryInductionRecordDetailRespDto_1.getReportChargeInductionRecordId());//sourceId:312905_1
            retData.setUpdateStatus(queryInductionRecordDetailRespDto_1.getUpdateStatus());//sourceId:38663_1
            retData.setOperationInductionId(queryInductionRecordDetailRespDto_1.getOperationInductionId());//sourceId:38664_1
            retData.setOperateTime(queryInductionRecordDetailRespDto_1.getOperateTime());//sourceId:38665_1
        }
        if (queryInductionRecordInfoDetailComRespDto_1 != null) {
            retData.setReportChargeIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//sourceId:38666_1
            retData.setReportChargeNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//sourceId:38999_1
        }
        if (queryInductionRecordInfoDetailComRespDto_3 != null) {
            retData.setOperationIdCardName(queryInductionRecordInfoDetailComRespDto_3.getIdCardName());//sourceId:38667_1
            retData.setOperationNickName(queryInductionRecordInfoDetailComRespDto_3.getNickName());//sourceId:197932_1
        }


        return retData;
    }

    /**
     * B1-3查询就职记录详情（管理）[793]
     * gen by moon at 9/22/2023, 6:50:02 PM
     */
    @Trace(operationName = "B1-3查询就职记录详情（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryInductionRecordDetailRespDto queryInductionRecordDetail(BffQueryInductionRecordDetailReqDto reqDto) {


        QueryInductionRecordDetailRespDto queryInductionRecordDetailRespDto_1 = null;
        QueryInductionRecordListRespDto queryInductionRecordListRespDto_1 = null;
        ImplementCurrentStaffMajorPositionElementAnalyseComRespDto implementCurrentStaffMajorPositionElementAnalyseComRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_1 = null;
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_3 = null;
//步骤0: D1-3查询就职记录详情 - queryInductionRecordDetail
        QueryInductionRecordDetailRespDto queryInductionRecordDetailRespDto = null;
        QueryInductionRecordDetailReqDto queryInductionRecordDetailReqDto = new QueryInductionRecordDetailReqDto();
        if (reqDto != null) {
            queryInductionRecordDetailReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:38448_1
        }

        /*D1-3查询就职记录详情[405]   */
        Assert.isNull(queryInductionRecordDetailReqDto.getInductionRecordId(), "B1-3查询就职记录详情（管理）-D1-3查询就职记录详情-就职记录ID不能为空", false);
        queryInductionRecordDetailRespDto = fwBaseInductionRecordClient.queryInductionRecordDetail(queryInductionRecordDetailReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryInductionRecordDetailRespDto_1 = queryInductionRecordDetailRespDto;

//步骤1: D1-3查就职记录列表 - queryInductionRecordList
        QueryInductionRecordListRespDto queryInductionRecordListRespDto = null;
        if (queryInductionRecordDetailRespDto != null) {
            QueryInductionRecordListReqDto queryInductionRecordListReqDto = new QueryInductionRecordListReqDto();
            queryInductionRecordListReqDto.setInductionUnitTypeCode("DEPT");//sourceId:1132312_1
            queryInductionRecordListReqDto.setIsArchive("FALSE");//sourceId:1132315_1
            queryInductionRecordListReqDto.setArchivngType("NOT_ARCHIVE");//sourceId:1132319_1
            queryInductionRecordListReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:1132316_1
            if (queryInductionRecordDetailRespDto != null) {
                queryInductionRecordListReqDto.setOriginalRoleMemberId(queryInductionRecordDetailRespDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:1132314_1
                queryInductionRecordListReqDto.setOrganizationId(queryInductionRecordDetailRespDto.getOrganizationId());//SimpleFieldAssign//sourceId:1132313_1
            }

            /*D1-3查就职记录列表[1505]   */
            Assert.isNull(queryInductionRecordListReqDto.getOriginalRoleMemberId(), "B1-3查询就职记录详情（管理）-D1-3查就职记录列表-身份人员ID不能为空", false);
            Assert.isNull(queryInductionRecordListReqDto.getOrganizationId(), "B1-3查询就职记录详情（管理）-D1-3查就职记录列表-组织ID不能为空", false);
            Assert.isNull(queryInductionRecordListReqDto.getInductionUnitTypeCode(), "B1-3查询就职记录详情（管理）-D1-3查就职记录列表-就职单位类型实例不能为空", false);
            Assert.isNull(queryInductionRecordListReqDto.getIsArchive(), "B1-3查询就职记录详情（管理）-D1-3查就职记录列表-是否存档不能为空", false);
            Assert.isNull(queryInductionRecordListReqDto.getArchivngType(), "B1-3查询就职记录详情（管理）-D1-3查就职记录列表-存档类型不能为空", false);
            Assert.isNull(queryInductionRecordListReqDto.getSpaceId(), "B1-3查询就职记录详情（管理）-D1-3查就职记录列表-创建于空间ID不能为空", false);
            queryInductionRecordListRespDto = fwBaseInductionRecordClient.queryInductionRecordList(queryInductionRecordListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            queryInductionRecordListRespDto_1 = queryInductionRecordListRespDto;
        }

//步骤2: D1-当前员工设主岗元素分析(公共) - implementCurrentStaffMajorPositionElementAnalyseCom
        ImplementCurrentStaffMajorPositionElementAnalyseComRespDto implementCurrentStaffMajorPositionElementAnalyseComRespDto = null;
        if (queryInductionRecordListRespDto != null) {
            ImplementCurrentStaffMajorPositionElementAnalyseComReqDto implementCurrentStaffMajorPositionElementAnalyseComReqDto = new ImplementCurrentStaffMajorPositionElementAnalyseComReqDto();
            if (queryInductionRecordListRespDto != null && queryInductionRecordListRespDto.getOrgInductionRecordList() != null && !CollectionUtil.isEmpty(queryInductionRecordListRespDto.getOrgInductionRecordList())) {
                implementCurrentStaffMajorPositionElementAnalyseComReqDto.setOrgInductionRecordList(queryInductionRecordListRespDto.getOrgInductionRecordList().stream().map(item -> item.getInductionRecordId())
                        .collect(Collectors.toList()));/*list-to-strings*///sourceId:1127108_1
            }

            /*D1-当前员工设主岗元素分析(公共)[7428]   */

            implementCurrentStaffMajorPositionElementAnalyseComRespDto = fwBaseInductionRecordClient.implementCurrentStaffMajorPositionElementAnalyseCom(implementCurrentStaffMajorPositionElementAnalyseComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            implementCurrentStaffMajorPositionElementAnalyseComRespDto_1 = implementCurrentStaffMajorPositionElementAnalyseComRespDto;
        }

//步骤3: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto = null;
        if (queryInductionRecordDetailRespDto != null && queryInductionRecordDetailRespDto != null && queryInductionRecordDetailRespDto.getReportChargeInductionRecordId() != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto = new QueryInductionRecordInfoDetailComReqDto();
            if (queryInductionRecordDetailRespDto != null) {
                queryInductionRecordInfoDetailComReqDto.setInductionRecordId(queryInductionRecordDetailRespDto.getReportChargeInductionRecordId());//SimpleFieldAssign//sourceId:38494_1
            }

            /*D1-3查询个人就职记录信息详情（查汇报主管姓名）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto.getInductionRecordId(), "B1-3查询就职记录详情（管理）-D1-3查询个人就职记录信息详情（查汇报主管姓名）-就职记录ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


            queryInductionRecordInfoDetailComRespDto_1 = queryInductionRecordInfoDetailComRespDto;
        }

//步骤4: D1-3查询个人就职记录信息详情（公共） - queryInductionRecordInfoDetailCom
        QueryInductionRecordInfoDetailComRespDto queryInductionRecordInfoDetailComRespDto_2 = null;
        if (queryInductionRecordDetailRespDto != null) {
            QueryInductionRecordInfoDetailComReqDto queryInductionRecordInfoDetailComReqDto_1 = new QueryInductionRecordInfoDetailComReqDto();
            if (queryInductionRecordDetailRespDto != null) {
                queryInductionRecordInfoDetailComReqDto_1.setInductionRecordId(queryInductionRecordDetailRespDto.getOperationInductionId());//SimpleFieldAssign//sourceId:38500_1
            }

            /*D1-3查询个人就职记录信息详情（查操作人名）[715]   */
            Assert.isNull(queryInductionRecordInfoDetailComReqDto_1.getInductionRecordId(), "B1-3查询就职记录详情（管理）-D1-3查询个人就职记录信息详情（查操作人名）-就职记录ID不能为空", false);
            queryInductionRecordInfoDetailComRespDto_2 = fwBaseInductionRecordClient.queryInductionRecordInfoDetailCom(queryInductionRecordInfoDetailComReqDto_1).getData()/*vcase invoke 跨dubbo调用;*/;


            queryInductionRecordInfoDetailComRespDto_3 = queryInductionRecordInfoDetailComRespDto_2;
        }

        BffQueryInductionRecordDetailRespDto retData = new BffQueryInductionRecordDetailRespDto();
        if (queryInductionRecordDetailRespDto_1 != null) {
            retData.setInductionRecordId(queryInductionRecordDetailRespDto_1.getInductionRecordId());//SimpleFieldAssign//sourceId:38523_1
            retData.setOriginalRoleMemberId(queryInductionRecordDetailRespDto_1.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:38524_1
            retData.setUserId(queryInductionRecordDetailRespDto_1.getUserId());//SimpleFieldAssign//sourceId:38525_1
            retData.setUserFace(queryInductionRecordDetailRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:38526_1
            retData.setIdCardName(queryInductionRecordDetailRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:38527_1
            retData.setNickName(queryInductionRecordDetailRespDto_1.getNickName());//SimpleFieldAssign//sourceId:38528_1
            retData.setSex(queryInductionRecordDetailRespDto_1.getSex());//SimpleFieldAssign//sourceId:38529_1
            retData.setRoleMemberCode(queryInductionRecordDetailRespDto_1.getRoleMemberCode());//SimpleFieldAssign//sourceId:38530_1
            retData.setIsPtJob(queryInductionRecordDetailRespDto_1.getIsPtJob());//SimpleFieldAssign//sourceId:56497_1
            retData.setRelaMemo(queryInductionRecordDetailRespDto_1.getRelaMemo());//SimpleFieldAssign//sourceId:38532_1
            retData.setOrganizationId(queryInductionRecordDetailRespDto_1.getOrganizationId());//SimpleFieldAssign//sourceId:38533_1
            retData.setOrganizationName(queryInductionRecordDetailRespDto_1.getOrganizationName());//SimpleFieldAssign//sourceId:38534_1
            retData.setFirstLetter(queryInductionRecordDetailRespDto_1.getFirstLetter());//SimpleFieldAssign//sourceId:38537_1
            retData.setIsMainInduction(queryInductionRecordDetailRespDto_1.getIsMainInduction());//SimpleFieldAssign//sourceId:38538_1
            retData.setIsDirector(queryInductionRecordDetailRespDto_1.getIsDirector());//SimpleFieldAssign//sourceId:247258_1
            retData.setIsXzDirector(queryInductionRecordDetailRespDto_1.getIsXzDirector());//SimpleFieldAssign//sourceId:1132590_1
            retData.setIsCustomPosition(queryInductionRecordDetailRespDto_1.getIsCustomPosition());//SimpleFieldAssign//sourceId:38539_1
            retData.setPositionType(queryInductionRecordDetailRespDto_1.getPositionType());//SimpleFieldAssign//sourceId:38540_1
            retData.setStaffingId(queryInductionRecordDetailRespDto_1.getStaffingId());//SimpleFieldAssign//sourceId:38541_1
            retData.setInductionStartTime(queryInductionRecordDetailRespDto_1.getInductionStartTime());//SimpleFieldAssign//sourceId:38551_1
            retData.setPositionIdName(queryInductionRecordDetailRespDto_1.getPositionIdName());//SimpleFieldAssign//sourceId:38542_1
            retData.setPositionId(queryInductionRecordDetailRespDto_1.getPositionId());//SimpleFieldAssign//sourceId:38543_1
            retData.setPositionGradeId(queryInductionRecordDetailRespDto_1.getPositionGradeId());//SimpleFieldAssign//sourceId:63286_1
            retData.setPositionGradeName(queryInductionRecordDetailRespDto_1.getPositionGradeName());//SimpleFieldAssign//sourceId:38544_1
            retData.setTypeDictionaryName(queryInductionRecordDetailRespDto_1.getTypeDictionaryName());//SimpleFieldAssign//sourceId:38545_1
            retData.setStationName(queryInductionRecordDetailRespDto_1.getStationName());//SimpleFieldAssign//sourceId:38546_1
            retData.setPostName(queryInductionRecordDetailRespDto_1.getPostName());//SimpleFieldAssign//sourceId:38547_1
            retData.setStationTypeName(queryInductionRecordDetailRespDto_1.getStationTypeName());//SimpleFieldAssign//sourceId:38548_1
            retData.setStationGradeName(queryInductionRecordDetailRespDto_1.getStationGradeName());//SimpleFieldAssign//sourceId:38549_1
            retData.setUpdateStatus(queryInductionRecordDetailRespDto_1.getUpdateStatus());//SimpleFieldAssign//sourceId:38552_1
            retData.setSubjectLifeCycle(queryInductionRecordDetailRespDto_1.getSubjectLifeCycle());//SimpleFieldAssign//sourceId:259218_1
            retData.setArchivngType(queryInductionRecordDetailRespDto_1.getArchivngType());//SimpleFieldAssign//sourceId:259469_1
            retData.setCurrentDeptId(queryInductionRecordDetailRespDto_1.getEntityId());//SimpleFieldAssign//sourceId:197920_1
            retData.setCurrentDeptName(queryInductionRecordDetailRespDto_1.getDeptShortName());//SimpleFieldAssign//sourceId:197921_1
            retData.setChargeDeptId(queryInductionRecordDetailRespDto_1.getDeptId());//SimpleFieldAssign//sourceId:197922_1
            retData.setChargeDeptName(queryInductionRecordDetailRespDto_1.getDeptName());//SimpleFieldAssign//sourceId:197923_1
            retData.setReportChargeInductionRecordId(queryInductionRecordDetailRespDto_1.getReportChargeInductionRecordId());//SimpleFieldAssign//sourceId:312904_1
            retData.setOrderNumber(queryInductionRecordDetailRespDto_1.getOrderNumber());//SimpleFieldAssign//sourceId:157601_1
            retData.setOperationInductionId(queryInductionRecordDetailRespDto_1.getOperationInductionId());//SimpleFieldAssign//sourceId:38553_1
            retData.setOperateTime(queryInductionRecordDetailRespDto_1.getOperateTime());//SimpleFieldAssign//sourceId:38554_1
        }
        if (queryInductionRecordInfoDetailComRespDto_1 != null) {
            retData.setReportChargeIdCardName(queryInductionRecordInfoDetailComRespDto_1.getIdCardName());//SimpleFieldAssign//sourceId:197917_1
            retData.setReportChargeNickName(queryInductionRecordInfoDetailComRespDto_1.getNickName());//SimpleFieldAssign//sourceId:197918_1
            retData.setReportChargeFace(queryInductionRecordInfoDetailComRespDto_1.getUserFace());//SimpleFieldAssign//sourceId:197919_1
        }
        if (implementCurrentStaffMajorPositionElementAnalyseComRespDto_1 != null) {
            retData.setSetMajorPositionElement(implementCurrentStaffMajorPositionElementAnalyseComRespDto_1.getSetMajorPositionElement());//SimpleFieldAssign//sourceId:1128781_1
        }
        if (queryInductionRecordInfoDetailComRespDto_3 != null) {
            retData.setOperationIdCardName(queryInductionRecordInfoDetailComRespDto_3.getIdCardName());//SimpleFieldAssign//sourceId:197925_1
            retData.setOperationNickName(queryInductionRecordInfoDetailComRespDto_3.getNickName());//SimpleFieldAssign//sourceId:197926_1
        }
        if (queryInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1132320_1
        }


        return retData;
    }

    /**
     * B1-3删除就职记录(管理)[786]
     * gen by moon at 9/23/2023, 11:46:48 AM
     */
    @Trace(operationName = "B1-3删除就职记录(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffDeleteInductionRecordRespDto deleteInductionRecord(BffDeleteInductionRecordReqDto reqDto) {


        //virtualUsage D1分析就职记录删除操作条件  48700
        ImplementAnalyseInductionRecordLifecyCycleOperationTermRespDto implementAnalyseInductionRecordLifecyCycleOperationTermRespDto = null;
        ImplementAnalyseInductionRecordLifecyCycleOperationTermReqDto implementAnalyseInductionRecordLifecyCycleOperationTermReqDto = new ImplementAnalyseInductionRecordLifecyCycleOperationTermReqDto();
        implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.setLifecyCycleOperationType("DELETE");//sourceId:1128732_1_48700
        if (reqDto != null) {
            implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:1128731_1_48700
        }

        /*D1分析就职记录删除操作条件[7431]   */
        Assert.isNull(implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.getInductionRecordId(), "B1-3删除就职记录(管理)-D1分析就职记录删除操作条件-就职记录ID不能为空", false);
        Assert.isNull(implementAnalyseInductionRecordLifecyCycleOperationTermReqDto.getLifecyCycleOperationType(), "B1-3删除就职记录(管理)-D1分析就职记录删除操作条件-生命周期操作类型不能为空", false);
        implementAnalyseInductionRecordLifecyCycleOperationTermRespDto = fwBaseInductionRecordClient.implementAnalyseInductionRecordLifecyCycleOperationTerm(implementAnalyseInductionRecordLifecyCycleOperationTermReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        if ((implementAnalyseInductionRecordLifecyCycleOperationTermRespDto != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse() != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse().equals("TRUE"))) {
            //if(D1分析就职记录删除条件.是否允许就职记录生命周期操作 等于 是)  48701

            DeleteInductionRecordRespDto deleteInductionRecordRespDto = null;
            DeleteInductionRecordReqDto deleteInductionRecordReqDto = new DeleteInductionRecordReqDto();
            if (reqDto != null) {
                deleteInductionRecordReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:37965_1_48702
            }

            /*D1-3删除就职记录[778]   */
            Assert.isNull(deleteInductionRecordReqDto.getInductionRecordId(), "B1-3删除就职记录(管理)-D1-3删除就职记录-就职记录ID不能为空", false);
            deleteInductionRecordRespDto = fwBaseInductionRecordClient.deleteInductionRecord(deleteInductionRecordReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        } else if ((implementAnalyseInductionRecordLifecyCycleOperationTermRespDto != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse() != null && implementAnalyseInductionRecordLifecyCycleOperationTermRespDto.getTureOrFalse().equals("FALSE"))) {
            //elseif(D1分析就职记录删除条件.是否允许就职记录生命周期操作 等于 否)  48703

//异常结束 48898
            throw new BizException("10300256", "对不起！当前员工为主岗位，请设新岗位后再试~", false);
        }
        BffDeleteInductionRecordRespDto retData = new BffDeleteInductionRecordRespDto();


        return retData;
    }

    /**
     * B1-3修改就职记录（管理）[785]
     * gen by moon at 9/20/2023, 11:53:02 PM
     */
    @Trace(operationName = "B1-3修改就职记录（管理）")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffUpdateInductionRecordRespDto updateInductionRecord(BffUpdateInductionRecordReqDto reqDto) {


        //步骤0: D1-3修改就职记录 - updateInductionRecord
        UpdateInductionRecordRespDto updateInductionRecordRespDto = null;
        UpdateInductionRecordReqDto updateInductionRecordReqDto = new UpdateInductionRecordReqDto();
        if (reqDto != null) {
            updateInductionRecordReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:36408_1
            updateInductionRecordReqDto.setPositionType(reqDto.getPositionType());//SimpleFieldAssign//sourceId:36413_1
            updateInductionRecordReqDto.setPositionIdName(reqDto.getPositionIdName());//SimpleFieldAssign//sourceId:36414_1
            updateInductionRecordReqDto.setInductionStartTime(reqDto.getInductionStartTime());//SimpleFieldAssign//sourceId:36415_1
            updateInductionRecordReqDto.setDirectorInductionRecordId(reqDto.getDirectorInductionRecordId());//SimpleFieldAssign//sourceId:36416_1
            updateInductionRecordReqDto.setIsDirector(reqDto.getIsDirector());//SimpleFieldAssign//sourceId:247186_1
            updateInductionRecordReqDto.setIsXzDirector(reqDto.getIsXzDirector());//SimpleFieldAssign//sourceId:1129151_1
            updateInductionRecordReqDto.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:36411_1
        }

        /*D1-3修改就职记录[777]   */
        Assert.isNull(updateInductionRecordReqDto.getInductionRecordId(), "B1-3修改就职记录（管理）-D1-3修改就职记录-就职记录ID不能为空", false);
        updateInductionRecordRespDto = fwBaseInductionRecordClient.updateInductionRecord(updateInductionRecordReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffUpdateInductionRecordRespDto retData = new BffUpdateInductionRecordRespDto();


        return retData;
    }

    /**
     * B1-3查询管理模式部门直属就职记录列表(管理)[807]
     * gen by moon at 8/10/2022, 3:30:52 AM
     */
    @Trace(operationName = "B1-3查询管理模式部门直属就职记录列表(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDirectInductionRecordMgtListRespDto queryDirectInductionRecordMgtList(BffQueryDirectInductionRecordMgtListReqDto reqDto) {


        QueryDirectInductionRecordListRespDto queryDirectInductionRecordListRespDto_1 = null;
//步骤0: D1-3查询直属就职记录列表 - queryDirectInductionRecordList
        QueryDirectInductionRecordListRespDto queryDirectInductionRecordListRespDto = null;
        QueryDirectInductionRecordListReqDto queryDirectInductionRecordListReqDto = new QueryDirectInductionRecordListReqDto();
        queryDirectInductionRecordListReqDto.setInductionUnitTypeCode("DEPT");//sourceId:38174_1
        queryDirectInductionRecordListReqDto.setIsArchive("FALSE");//sourceId:38176_1
        if (reqDto != null) {
            queryDirectInductionRecordListReqDto.setEntityId(reqDto.getEntityId());//sourceId:38175_1
        }

        /*D1-3查询直属就职记录列表[452]   */
        Assert.isNull(queryDirectInductionRecordListReqDto.getInductionUnitTypeCode(), "B1-3查询管理模式部门直属就职记录列表(管理)-D1-3查询直属就职记录列表-就职单位类型实例不能为空", false);
        Assert.isNull(queryDirectInductionRecordListReqDto.getEntityId(), "B1-3查询管理模式部门直属就职记录列表(管理)-D1-3查询直属就职记录列表-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryDirectInductionRecordListReqDto.getIsArchive(), "B1-3查询管理模式部门直属就职记录列表(管理)-D1-3查询直属就职记录列表-是否存档不能为空", false);
        queryDirectInductionRecordListRespDto = fwBaseInductionRecordClient.queryDirectInductionRecordList(queryDirectInductionRecordListReqDto).getData();

        queryDirectInductionRecordListRespDto_1 = queryDirectInductionRecordListRespDto;

        BffQueryDirectInductionRecordMgtListRespDto retData = new BffQueryDirectInductionRecordMgtListRespDto();
        if (queryDirectInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryDirectInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:38180_1
        }


        return retData;
    }

    /**
     * B1-3新增就职记录(管理)[784]
     * gen by moon at 9/23/2023, 11:46:46 AM
     */
    @Trace(operationName = "B1-3新增就职记录(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffAddInductionRecordRespDto addInductionRecord(BffAddInductionRecordReqDto reqDto) {


        AddInductionRecordRespDto addInductionRecordRespDto_1 = null;
//步骤0: D1-3新增就职记录 - addInductionRecord
        AddInductionRecordRespDto addInductionRecordRespDto = null;
        AddInductionRecordReqDto addInductionRecordReqDto = new AddInductionRecordReqDto();
        if (reqDto != null) {
            addInductionRecordReqDto.setPositionId(reqDto.getPositionId());//SimpleFieldAssign//sourceId:22969_1
            addInductionRecordReqDto.setPositionIdNameId(reqDto.getPositionIdNameId());//SimpleFieldAssign//sourceId:22970_1
            addInductionRecordReqDto.setPositionIdName(reqDto.getPositionIdName());//SimpleFieldAssign//sourceId:22971_1
            addInductionRecordReqDto.setOriginalRoleMemberId(reqDto.getOriginalRoleMemberId());//SimpleFieldAssign//sourceId:22973_1
            addInductionRecordReqDto.setFirstLetter(reqDto.getFirstLetter());//SimpleFieldAssign//sourceId:22974_1
            addInductionRecordReqDto.setUserId(reqDto.getUserId());//SimpleFieldAssign//sourceId:22975_1
            addInductionRecordReqDto.setOrganizationId(reqDto.getOrganizationId());//SimpleFieldAssign//sourceId:22976_1
            addInductionRecordReqDto.setOrganizationName(reqDto.getOrganizationName());//SimpleFieldAssign//sourceId:22977_1
            addInductionRecordReqDto.setDeptShortName(reqDto.getDeptShortName());//SimpleFieldAssign//sourceId:35363_1
            addInductionRecordReqDto.setInductionUnitTypeCode(reqDto.getInductionUnitTypeCode());//SimpleFieldAssign//sourceId:51302_1
            addInductionRecordReqDto.setEntityId(reqDto.getEntityId());//SimpleFieldAssign//sourceId:22978_1
            addInductionRecordReqDto.setIsCustomPosition(reqDto.getIsCustomPosition());//SimpleFieldAssign//sourceId:22981_1
            addInductionRecordReqDto.setPositionType(reqDto.getPositionType());//SimpleFieldAssign//sourceId:35380_1
            addInductionRecordReqDto.setInductionStartTime(reqDto.getInductionStartTime());//SimpleFieldAssign//sourceId:35381_1
            addInductionRecordReqDto.setOrderNumber(reqDto.getOrderNumber());//SimpleFieldAssign//sourceId:157618_1
            addInductionRecordReqDto.setDirectorInductionRecordId(reqDto.getDirectorInductionRecordId());//SimpleFieldAssign//sourceId:22982_1
            addInductionRecordReqDto.setIsPartTimeStaffing(reqDto.getIsPartTimeStaffing());//SimpleFieldAssign//sourceId:51312_1
            addInductionRecordReqDto.setIsDirector(reqDto.getIsDirector());//SimpleFieldAssign//sourceId:246854_1
            addInductionRecordReqDto.setIsXzDirector(reqDto.getIsXzDirector());//SimpleFieldAssign//sourceId:1132558_1
        }

        /*D1-3新增就职记录[403]   */
        Assert.isNull(addInductionRecordReqDto.getPositionIdName(), "B1-3新增就职记录(管理)-D1-3新增就职记录-必选冗余职务名称不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getOriginalRoleMemberId(), "B1-3新增就职记录(管理)-D1-3新增就职记录-身份人员ID不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getFirstLetter(), "B1-3新增就职记录(管理)-D1-3新增就职记录-备注首位字母不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getUserId(), "B1-3新增就职记录(管理)-D1-3新增就职记录-个人账号ID不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getOrganizationId(), "B1-3新增就职记录(管理)-D1-3新增就职记录-组织ID不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getOrganizationName(), "B1-3新增就职记录(管理)-D1-3新增就职记录-冗余组织名称不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getInductionUnitTypeCode(), "B1-3新增就职记录(管理)-D1-3新增就职记录-就职单位类型实例不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getEntityId(), "B1-3新增就职记录(管理)-D1-3新增就职记录-就职单位对象实例ID不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getIsCustomPosition(), "B1-3新增就职记录(管理)-D1-3新增就职记录-是否自定义职务不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getPositionType(), "B1-3新增就职记录(管理)-D1-3新增就职记录-职务性质不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getOrderNumber(), "B1-3新增就职记录(管理)-D1-3新增就职记录-排序不能为空", false);
        Assert.isNull(addInductionRecordReqDto.getIsDirector(), "B1-3新增就职记录(管理)-D1-3新增就职记录-是否主管不能为空", false);
        addInductionRecordRespDto = fwBaseInductionRecordClient.addInductionRecord(addInductionRecordReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        addInductionRecordRespDto_1 = addInductionRecordRespDto;

        BffAddInductionRecordRespDto retData = new BffAddInductionRecordRespDto();
        if (addInductionRecordRespDto_1 != null) {
            retData.setInductionRecordId(addInductionRecordRespDto_1.getInductionRecordId());//SimpleFieldAssign//sourceId:29740_1
        }


        return retData;
    }

    /**
     * B1-3判断进入就职记录管理模式权限(管理)[3717]
     * gen by moon at 8/25/2022, 10:15:57 PM
     */
    @Trace(operationName = "B1-3判断进入就职记录管理模式权限(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffJudgeEnterInductionRecordMgtPowerRespDto judgeEnterInductionRecordMgtPower(BffJudgeEnterInductionRecordMgtPowerReqDto reqDto) {


        JudgeMgtPowerRespDto judgeMgtPowerRespDto_1 = null;
//步骤0: D1-3判断管理模式权限(管理) - judgeMgtPower
        JudgeMgtPowerRespDto judgeMgtPowerRespDto = null;
        JudgeMgtPowerReqDto judgeMgtPowerReqDto = new JudgeMgtPowerReqDto();
        if (reqDto != null) {
            judgeMgtPowerReqDto.setOrganizationId(reqDto.getOrganizationId());//sourceId:181281_1
        }

        /*D1-3判断管理模式权限(管理)[3719]   */
        Assert.isNull(judgeMgtPowerReqDto.getOrganizationId(), "B1-3判断进入就职记录管理模式权限(管理)-D1-3判断管理模式权限(管理)-组织ID不能为空", false);
        judgeMgtPowerRespDto = fwBaseOrgClient.judgeMgtPower(judgeMgtPowerReqDto).getData();

        judgeMgtPowerRespDto_1 = judgeMgtPowerRespDto;

        BffJudgeEnterInductionRecordMgtPowerRespDto retData = new BffJudgeEnterInductionRecordMgtPowerRespDto();
        if (judgeMgtPowerRespDto_1 != null) {
            retData.setEnterMgtPowerType(judgeMgtPowerRespDto_1.getEnterMgtPowerType());//sourceId:173922_1
        }


        return retData;
    }

    /**
     * B1-3查询可分配主管就职记录列表[4011]
     * gen by moon at 9/12/2022, 12:30:13 AM
     */
    @Trace(operationName = "B1-3查询可分配主管就职记录列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryChargeInductionRecordListRespDto queryChargeInductionRecordList(BffQueryChargeInductionRecordListReqDto reqDto) {


        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        queryOrgDetailComReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:211597_1
        queryOrgDetailComReqDto.setUsingLockStatus("UNLOCK");//sourceId:211604_1

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3查询可分配主管就职记录列表-D1-3查询组织详情(公共)-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailComReqDto.getUsingLockStatus(), "B1-3查询可分配主管就职记录列表-D1-3查询组织详情(公共)-使用锁定状态不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();
        Assert.isTrue(queryOrgDetailComRespDto == null || queryOrgDetailComRespDto.getOrganizationId() == null, "返回值不能为空", false);


//步骤1: D1-3查询就职记录列表(公共) - queryInductionRecordListCom
        QueryInductionRecordListComRespDto queryInductionRecordListComRespDto = null;
        QueryInductionRecordListComReqDto queryInductionRecordListComReqDto = new QueryInductionRecordListComReqDto();
        queryInductionRecordListComReqDto.setInductionUnitTypeCode("DEPT");//sourceId:211633_1
        queryInductionRecordListComReqDto.setIsTransaction("FALSE");//sourceId:211638_1
        queryInductionRecordListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:211642_1
        queryInductionRecordListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:211641_1
        if (reqDto != null) {
            queryInductionRecordListComReqDto.setEntityId(reqDto.getEntityId());//sourceId:211634_1
//queryInductionRecordListComReqDto.setIsDeputy(reqDto.getIsDeputy());//sourceId:212755_1
        }

        /*D1-3查询就职记录列表(公共)[3933]   */
        Assert.isNull(queryInductionRecordListComReqDto.getEntityId(), "B1-3查询可分配主管就职记录列表-D1-3查询就职记录列表(公共)-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getInductionUnitTypeCode(), "B1-3查询可分配主管就职记录列表-D1-3查询就职记录列表(公共)-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getIsTransaction(), "B1-3查询可分配主管就职记录列表-D1-3查询就职记录列表(公共)-是否异动不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSubjectLifeCycle(), "B1-3查询可分配主管就职记录列表-D1-3查询就职记录列表(公共)-主体生命周期不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSpaceId(), "B1-3查询可分配主管就职记录列表-D1-3查询就职记录列表(公共)-创建于空间ID不能为空", false);
        queryInductionRecordListComRespDto = fwBaseInductionRecordClient.queryInductionRecordListCom(queryInductionRecordListComReqDto).getData();


//步骤2: D3-6查询虚拟组织成员列表(公共) - queryVirtualOrgMemberListCom
        QueryVirtualOrgMemberListComRespDto queryVirtualOrgMemberListComRespDto = null;
        QueryVirtualOrgMemberListComReqDto queryVirtualOrgMemberListComReqDto = new QueryVirtualOrgMemberListComReqDto();
//  queryVirtualOrgMemberListComReqDto.setEvaluationTemplateType("EVA_TEMP");//sourceId:234716_1
//queryVirtualOrgMemberListComReqDto.setRoleCode("DIRECTOR");//CUSTOM_CONVENTION//sourceId:211611_1
//queryVirtualOrgMemberListComReqDto.setIsArchive("FALSE");//sourceId:211622_1
        if (reqDto != null) {
//      queryVirtualOrgMemberListComReqDto.setEntityId(reqDto.getEntityId());//sourceId:211612_1
//queryVirtualOrgMemberListComReqDto.setTableTypeCode(reqDto.getTableTypeCode());//sourceId:211613_1
            queryVirtualOrgMemberListComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//sourceId:234717_1
        }

        /*D3-6查询虚拟组织成员列表(公共)[3935]   */
//    Assert.isNull(queryVirtualOrgMemberListComReqDto.getEntityId(),"B1-3查询可分配主管就职记录列表-D3-6查询虚拟组织成员列表(公共)-冗余内容表主键ID不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getTableTypeCode(),"B1-3查询可分配主管就职记录列表-D3-6查询虚拟组织成员列表(公共)-冗余内容表类型编码不能为空",false);
        Assert.isNull(queryVirtualOrgMemberListComReqDto.getEvaluationTemplateId(), "B1-3查询可分配主管就职记录列表-D3-6查询虚拟组织成员列表(公共)-归属对象ID不能为空", false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getEvaluationTemplateType(),"B1-3查询可分配主管就职记录列表-D3-6查询虚拟组织成员列表(公共)-归属对象类型不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getRoleCode(),"B1-3查询可分配主管就职记录列表-D3-6查询虚拟组织成员列表(公共)-角色标识不能为空",false);
        queryVirtualOrgMemberListComRespDto = fwAppVirtualOrgClient.queryVirtualOrgMemberListCom(queryVirtualOrgMemberListComReqDto).getData();


//步骤3: D1-集合去除已存在员工就职记录数据(公共) - addCollectionRemoveExistingDataCom
        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto = null;
        if (queryInductionRecordListComRespDto != null) {
            AddCollectionRemoveExistingDataComReqDto addCollectionRemoveExistingDataComReqDto = new AddCollectionRemoveExistingDataComReqDto();
            if (queryInductionRecordListComRespDto != null) {
                addCollectionRemoveExistingDataComReqDto.setOrgInductionRecordList(queryInductionRecordListComRespDto.getOrgInductionRecordList());//sourceId:211630_1
            }
            if (queryVirtualOrgMemberListComRespDto != null) {
//      addCollectionRemoveExistingDataComReqDto.setExistingInductionRecordList(queryVirtualOrgMemberListComRespDto.getVirtualOrgMemberList().stream().map(item->item.getVirtualOrgInductionRecordId())
//        .collect(Collectors.toList()));//sourceId:211631_1
            }

            /*D1-集合去除已存在员工就职记录数据(公共)[3931]   */

            addCollectionRemoveExistingDataComRespDto = fwBaseDivineDataClient.addCollectionRemoveExistingDataCom(addCollectionRemoveExistingDataComReqDto).getData();


            addCollectionRemoveExistingDataComRespDto_1 = addCollectionRemoveExistingDataComRespDto;
        }

        BffQueryChargeInductionRecordListRespDto retData = new BffQueryChargeInductionRecordListRespDto();
        if (addCollectionRemoveExistingDataComRespDto_1 != null) {
            retData.setOrgInductionRecordList(addCollectionRemoveExistingDataComRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:212761_1
        }


        return retData;
    }

    /**
     * B1-3批量查询直属就职记录(边界)[3105]
     * gen by moon at 9/12/2022, 12:30:09 AM
     */
    @Trace(operationName = "B1-3批量查询直属就职记录(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchQueryDirectInductionRecordBorderRespDto batchQueryDirectInductionRecordBorder(BffBatchQueryDirectInductionRecordBorderReqDto reqDto) {


        BatchQueryDirectInductionRecordRespDto batchQueryDirectInductionRecordRespDto_1 = null;
//virtualUsage D1-3查询组织详情(公共)  11030
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        queryOrgDetailComReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:172596_1_11030

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3批量查询直属就职记录(边界)-D1-3查询组织详情(公共)-组织ID不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();
        Assert.isTrue(queryOrgDetailComRespDto == null || queryOrgDetailComRespDto.getOrganizationId() == null, "返回值不能为空", false);


        if ((queryOrgDetailComRespDto != null && queryOrgDetailComRespDto.getUsingLockStatus() != null && queryOrgDetailComRespDto.getUsingLockStatus().equals("UNLOCK"))) {
            //if(D1-3查询组织详情.使用锁定状态 等于 未锁定)  11031

            BatchQueryDirectInductionRecordRespDto batchQueryDirectInductionRecordRespDto = null;
            BatchQueryDirectInductionRecordReqDto batchQueryDirectInductionRecordReqDto = new BatchQueryDirectInductionRecordReqDto();
            batchQueryDirectInductionRecordReqDto.setInductionUnitTypeCode("DEPT");//sourceId:106898_1_11032
            batchQueryDirectInductionRecordReqDto.setIsTransaction("FALSE");//sourceId:106900_1_11032
            batchQueryDirectInductionRecordReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:106901_1_11032
            if (reqDto != null) {
                batchQueryDirectInductionRecordReqDto.setOrgInductionRecordList(reqDto.getOrgInductionRecordList());//sourceId:106897_1_11032
                batchQueryDirectInductionRecordReqDto.setEntityId(reqDto.getEntityId());//sourceId:106899_1_11032
            }

            /*D1-3批量查询直属就职记录[3106]   */
            Assert.isNull(batchQueryDirectInductionRecordReqDto.getEntityId(), "B1-3批量查询直属就职记录(边界)-D1-3批量查询直属就职记录-就职单位对象实例ID不能为空", false);
            Assert.isNull(batchQueryDirectInductionRecordReqDto.getInductionUnitTypeCode(), "B1-3批量查询直属就职记录(边界)-D1-3批量查询直属就职记录-就职单位类型实例不能为空", false);
            Assert.isNull(batchQueryDirectInductionRecordReqDto.getIsTransaction(), "B1-3批量查询直属就职记录(边界)-D1-3批量查询直属就职记录-是否异动不能为空", false);
            batchQueryDirectInductionRecordRespDto = fwBaseInductionRecordClient.batchQueryDirectInductionRecord(batchQueryDirectInductionRecordReqDto).getData();


            batchQueryDirectInductionRecordRespDto_1 = batchQueryDirectInductionRecordRespDto;
//processBranchName:正常结束 ,processBranchId:11033

        } else {
            //else  11034

//异常结束 15526
            throw new BizException("10300124", "对不起，组织架构维护中，暂时无法使用，请稍后再试或联系管理员~", false);
        }
        BffBatchQueryDirectInductionRecordBorderRespDto retData = new BffBatchQueryDirectInductionRecordBorderRespDto();
        if (batchQueryDirectInductionRecordRespDto_1 != null) {
            retData.setOrgInductionRecordList(batchQueryDirectInductionRecordRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:106905_1
        }


        return retData;
    }

    /**
     * B1-3查询可分配参与者就职记录列表[3942]
     * gen by moon at 9/19/2022, 7:28:43 PM
     */
    @Trace(operationName = "B1-3查询可分配参与者就职记录列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryParticipantInductionRecordListRespDto queryParticipantInductionRecordList(BffQueryParticipantInductionRecordListReqDto reqDto) {


        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        queryOrgDetailComReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:201793_1
        queryOrgDetailComReqDto.setUsingLockStatus("UNLOCK");//sourceId:201800_1

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3查询可分配参与者就职记录列表-D1-3查询组织详情(公共)-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailComReqDto.getUsingLockStatus(), "B1-3查询可分配参与者就职记录列表-D1-3查询组织详情(公共)-使用锁定状态不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();
        Assert.isTrue(queryOrgDetailComRespDto == null || queryOrgDetailComRespDto.getOrganizationId() == null, "返回值不能为空", false);


//步骤1: D1-3查询就职记录列表(公共) - queryInductionRecordListCom
        QueryInductionRecordListComRespDto queryInductionRecordListComRespDto = null;
        QueryInductionRecordListComReqDto queryInductionRecordListComReqDto = new QueryInductionRecordListComReqDto();
        queryInductionRecordListComReqDto.setInductionUnitTypeCode("DEPT");//sourceId:201802_1
        queryInductionRecordListComReqDto.setIsTransaction("FALSE");//sourceId:201807_1
        queryInductionRecordListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:201811_1
        queryInductionRecordListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:201810_1
        if (reqDto != null) {
            queryInductionRecordListComReqDto.setEntityId(reqDto.getEntityId());//sourceId:201803_1
        }

        /*D1-3查询就职记录列表(公共)[3933]   */
        Assert.isNull(queryInductionRecordListComReqDto.getEntityId(), "B1-3查询可分配参与者就职记录列表-D1-3查询就职记录列表(公共)-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getInductionUnitTypeCode(), "B1-3查询可分配参与者就职记录列表-D1-3查询就职记录列表(公共)-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getIsTransaction(), "B1-3查询可分配参与者就职记录列表-D1-3查询就职记录列表(公共)-是否异动不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSubjectLifeCycle(), "B1-3查询可分配参与者就职记录列表-D1-3查询就职记录列表(公共)-主体生命周期不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSpaceId(), "B1-3查询可分配参与者就职记录列表-D1-3查询就职记录列表(公共)-创建于空间ID不能为空", false);
        queryInductionRecordListComRespDto = fwBaseInductionRecordClient.queryInductionRecordListCom(queryInductionRecordListComReqDto).getData();


//步骤2: D3-6查询虚拟组织成员列表(公共) - queryVirtualOrgMemberListCom
        QueryVirtualOrgMemberListComRespDto queryVirtualOrgMemberListComRespDto = null;
        QueryVirtualOrgMemberListComReqDto queryVirtualOrgMemberListComReqDto = new QueryVirtualOrgMemberListComReqDto();
//  queryVirtualOrgMemberListComReqDto.setEvaluationTemplateType("EVA_TEMP");//sourceId:234494_1
//queryVirtualOrgMemberListComReqDto.setRoleCode("PARTICIPANTS");//CUSTOM_CONVENTION//sourceId:201816_1
//queryVirtualOrgMemberListComReqDto.setIsArchive("FALSE");//sourceId:201827_1
        if (reqDto != null) {
//      queryVirtualOrgMemberListComReqDto.setEntityId(reqDto.getEntityId());//sourceId:201817_1
//queryVirtualOrgMemberListComReqDto.setTableTypeCode(reqDto.getTableTypeCode());//sourceId:201818_1
            queryVirtualOrgMemberListComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//sourceId:234495_1
        }

        /*D3-6查询虚拟组织成员列表(公共)[3935]   */
//    Assert.isNull(queryVirtualOrgMemberListComReqDto.getEntityId(),"B1-3查询可分配参与者就职记录列表-D3-6查询虚拟组织成员列表(公共)-冗余内容表主键ID不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getTableTypeCode(),"B1-3查询可分配参与者就职记录列表-D3-6查询虚拟组织成员列表(公共)-冗余内容表类型编码不能为空",false);
        Assert.isNull(queryVirtualOrgMemberListComReqDto.getEvaluationTemplateId(), "B1-3查询可分配参与者就职记录列表-D3-6查询虚拟组织成员列表(公共)-归属对象ID不能为空", false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getEvaluationTemplateType(),"B1-3查询可分配参与者就职记录列表-D3-6查询虚拟组织成员列表(公共)-归属对象类型不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getRoleCode(),"B1-3查询可分配参与者就职记录列表-D3-6查询虚拟组织成员列表(公共)-角色标识不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getIsArchive(),"B1-3查询可分配参与者就职记录列表-D3-6查询虚拟组织成员列表(公共)-是否存档不能为空",false);
        queryVirtualOrgMemberListComRespDto = fwAppVirtualOrgClient.queryVirtualOrgMemberListCom(queryVirtualOrgMemberListComReqDto).getData();


//步骤3: D1-集合去除已存在员工就职记录数据(公共) - addCollectionRemoveExistingDataCom
        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto = null;
        if (queryInductionRecordListComRespDto != null) {
            AddCollectionRemoveExistingDataComReqDto addCollectionRemoveExistingDataComReqDto = new AddCollectionRemoveExistingDataComReqDto();
            if (queryInductionRecordListComRespDto != null) {
                addCollectionRemoveExistingDataComReqDto.setOrgInductionRecordList(queryInductionRecordListComRespDto.getOrgInductionRecordList());//sourceId:201835_1
            }
            if (queryVirtualOrgMemberListComRespDto != null) {
//      addCollectionRemoveExistingDataComReqDto.setExistingInductionRecordList(queryVirtualOrgMemberListComRespDto.getVirtualOrgMemberList().stream().map(item->item.getVirtualOrgInductionRecordId())
//        .collect(Collectors.toList()));//sourceId:201836_1
            }

            /*D1-集合去除已存在员工就职记录数据(公共)[3931]   */

            addCollectionRemoveExistingDataComRespDto = fwBaseDivineDataClient.addCollectionRemoveExistingDataCom(addCollectionRemoveExistingDataComReqDto).getData();


            addCollectionRemoveExistingDataComRespDto_1 = addCollectionRemoveExistingDataComRespDto;
        }

        BffQueryParticipantInductionRecordListRespDto retData = new BffQueryParticipantInductionRecordListRespDto();
        if (addCollectionRemoveExistingDataComRespDto_1 != null) {
            retData.setOrgInductionRecordList(addCollectionRemoveExistingDataComRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:201865_1
        }


        return retData;
    }

    /**
     * B1-3查询可分配责任人就职记录列表[3937]
     * gen by moon at 9/19/2022, 7:28:41 PM
     */
    @Trace(operationName = "B1-3查询可分配责任人就职记录列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryPrincipalInductionRecordListRespDto queryPrincipalInductionRecordList(BffQueryPrincipalInductionRecordListReqDto reqDto) {


        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        queryOrgDetailComReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:201448_1
        queryOrgDetailComReqDto.setUsingLockStatus("UNLOCK");//sourceId:201455_1

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3查询可分配责任人就职记录列表-D1-3查询组织详情(公共)-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailComReqDto.getUsingLockStatus(), "B1-3查询可分配责任人就职记录列表-D1-3查询组织详情(公共)-使用锁定状态不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();
        Assert.isTrue(queryOrgDetailComRespDto == null || queryOrgDetailComRespDto.getOrganizationId() == null, "返回值不能为空", false);


//步骤1: D1-3查询就职记录列表(公共) - queryInductionRecordListCom
        QueryInductionRecordListComRespDto queryInductionRecordListComRespDto = null;
        QueryInductionRecordListComReqDto queryInductionRecordListComReqDto = new QueryInductionRecordListComReqDto();
        queryInductionRecordListComReqDto.setInductionUnitTypeCode("DEPT");//sourceId:201472_1
        queryInductionRecordListComReqDto.setIsTransaction("FALSE");//sourceId:201477_1
        queryInductionRecordListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:201481_1
        queryInductionRecordListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:201480_1
        if (reqDto != null) {
            queryInductionRecordListComReqDto.setEntityId(reqDto.getEntityId());//sourceId:201473_1
        }

        /*D1-3查询就职记录列表(公共)[3933]   */
        Assert.isNull(queryInductionRecordListComReqDto.getEntityId(), "B1-3查询可分配责任人就职记录列表-D1-3查询就职记录列表(公共)-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getInductionUnitTypeCode(), "B1-3查询可分配责任人就职记录列表-D1-3查询就职记录列表(公共)-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getIsTransaction(), "B1-3查询可分配责任人就职记录列表-D1-3查询就职记录列表(公共)-是否异动不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSubjectLifeCycle(), "B1-3查询可分配责任人就职记录列表-D1-3查询就职记录列表(公共)-主体生命周期不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSpaceId(), "B1-3查询可分配责任人就职记录列表-D1-3查询就职记录列表(公共)-创建于空间ID不能为空", false);
        queryInductionRecordListComRespDto = fwBaseInductionRecordClient.queryInductionRecordListCom(queryInductionRecordListComReqDto).getData();


//步骤2: D3-6查询虚拟组织成员列表(公共) - queryVirtualOrgMemberListCom
        QueryVirtualOrgMemberListComRespDto queryVirtualOrgMemberListComRespDto = null;
        QueryVirtualOrgMemberListComReqDto queryVirtualOrgMemberListComReqDto = new QueryVirtualOrgMemberListComReqDto();
//  queryVirtualOrgMemberListComReqDto.setRoleCode("PERSON_LIABLE");//CUSTOM_CONVENTION//sourceId:201486_1
//queryVirtualOrgMemberListComReqDto.setIsDirectStakeholders("TRUE");//sourceId:201493_1
//queryVirtualOrgMemberListComReqDto.setIsPersonCharge("TRUE");//sourceId:201495_1
//queryVirtualOrgMemberListComReqDto.setEvaluationTemplateType("EVA_TEMP");//sourceId:234491_1
//queryVirtualOrgMemberListComReqDto.setIsArchive("FALSE");//sourceId:201497_1
        if (reqDto != null) {
//      queryVirtualOrgMemberListComReqDto.setEntityId(reqDto.getEntityId());//sourceId:201487_1
//queryVirtualOrgMemberListComReqDto.setTableTypeCode(reqDto.getTableTypeCode());//sourceId:201488_1
            queryVirtualOrgMemberListComReqDto.setEvaluationTemplateId(reqDto.getEvaluationTemplateId());//sourceId:234492_1
        }

        /*D3-6查询虚拟组织成员列表(公共)[3935]   */
//    Assert.isNull(queryVirtualOrgMemberListComReqDto.getEntityId(),"B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-冗余内容表主键ID不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getTableTypeCode(),"B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-冗余内容表类型编码不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getRoleCode(),"B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-角色标识不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getIsDirectStakeholders(),"B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-是否直接干系人不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getIsPersonCharge(),"B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-是否负责人不能为空",false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getEvaluationTemplateType(),"B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-归属对象类型不能为空",false);
        Assert.isNull(queryVirtualOrgMemberListComReqDto.getEvaluationTemplateId(), "B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-归属对象ID不能为空", false);
//Assert.isNull(queryVirtualOrgMemberListComReqDto.getIsArchive(),"B1-3查询可分配责任人就职记录列表-D3-6查询虚拟组织成员列表(公共)-是否存档不能为空",false);
        queryVirtualOrgMemberListComRespDto = fwAppVirtualOrgClient.queryVirtualOrgMemberListCom(queryVirtualOrgMemberListComReqDto).getData();


//步骤3: D1-集合去除已存在员工就职记录数据(公共) - addCollectionRemoveExistingDataCom
        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto = null;
        if (queryInductionRecordListComRespDto != null) {
            AddCollectionRemoveExistingDataComReqDto addCollectionRemoveExistingDataComReqDto = new AddCollectionRemoveExistingDataComReqDto();
            if (queryInductionRecordListComRespDto != null) {
                addCollectionRemoveExistingDataComReqDto.setOrgInductionRecordList(queryInductionRecordListComRespDto.getOrgInductionRecordList());//sourceId:201505_1
            }
            if (queryVirtualOrgMemberListComRespDto != null) {
//      addCollectionRemoveExistingDataComReqDto.setExistingInductionRecordList(queryVirtualOrgMemberListComRespDto.getVirtualOrgMemberList().stream().map(item->item.getVirtualOrgInductionRecordId())
//        .collect(Collectors.toList()));//sourceId:201506_1
            }

            /*D1-集合去除已存在员工就职记录数据(公共)[3931]   */

            addCollectionRemoveExistingDataComRespDto = fwBaseDivineDataClient.addCollectionRemoveExistingDataCom(addCollectionRemoveExistingDataComReqDto).getData();


            addCollectionRemoveExistingDataComRespDto_1 = addCollectionRemoveExistingDataComRespDto;
        }

        BffQueryPrincipalInductionRecordListRespDto retData = new BffQueryPrincipalInductionRecordListRespDto();
        if (addCollectionRemoveExistingDataComRespDto_1 != null) {
            retData.setOrgInductionRecordList(addCollectionRemoveExistingDataComRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:201536_1
        }


        return retData;
    }

    /**
     * B1-3批量查询可分配责任人就职记录(边界)[4080]
     * gen by moon at 9/19/2022, 7:29:11 PM
     */
    @Trace(operationName = "B1-3批量查询可分配责任人就职记录(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffBatchQueryPrincipalInductionRecordBorderRespDto batchQueryPrincipalInductionRecordBorder(BffBatchQueryPrincipalInductionRecordBorderReqDto reqDto) {


        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto_1 = null;
//步骤0: D1-3查询组织详情(公共) - queryOrgDetailCom
        QueryOrgDetailComRespDto queryOrgDetailComRespDto = null;
        QueryOrgDetailComReqDto queryOrgDetailComReqDto = new QueryOrgDetailComReqDto();
        queryOrgDetailComReqDto.setOrganizationId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecHighestOrgID());//CURRENT_HIGH_ORGID//sourceId:220941_1
        queryOrgDetailComReqDto.setUsingLockStatus("UNLOCK");//sourceId:220948_1

        /*D1-3查询组织详情(公共)[800]   */
        Assert.isNull(queryOrgDetailComReqDto.getOrganizationId(), "B1-3批量查询可分配责任人就职记录(边界)-D1-3查询组织详情(公共)-组织ID不能为空", false);
        Assert.isNull(queryOrgDetailComReqDto.getUsingLockStatus(), "B1-3批量查询可分配责任人就职记录(边界)-D1-3查询组织详情(公共)-使用锁定状态不能为空", false);
        queryOrgDetailComRespDto = fwBaseOrgClient.queryOrgDetailCom(queryOrgDetailComReqDto).getData();
        Assert.isTrue(queryOrgDetailComRespDto == null || queryOrgDetailComRespDto.getOrganizationId() == null, "返回值不能为空", false);


//步骤1: D1-3查询就职记录列表(公共) - queryInductionRecordListCom
        QueryInductionRecordListComRespDto queryInductionRecordListComRespDto = null;
        QueryInductionRecordListComReqDto queryInductionRecordListComReqDto = new QueryInductionRecordListComReqDto();
        queryInductionRecordListComReqDto.setInductionUnitTypeCode("DEPT");//sourceId:220932_1
        queryInductionRecordListComReqDto.setIsTransaction("FALSE");//sourceId:220935_1
        queryInductionRecordListComReqDto.setSubjectLifeCycle("CURRENTLY_VALID");//sourceId:220938_1
        queryInductionRecordListComReqDto.setSpaceId(CommonFunctionHelper.getBaseInfoFromLocal().getSpecSpaceId());//CURRENT_SPACEID//sourceId:220937_1
        if (reqDto != null) {
            queryInductionRecordListComReqDto.setEntityId(reqDto.getEntityId());//sourceId:220933_1
        }

        /*D1-3查询就职记录列表(公共)[3933]   */
        Assert.isNull(queryInductionRecordListComReqDto.getInductionUnitTypeCode(), "B1-3批量查询可分配责任人就职记录(边界)-D1-3查询就职记录列表(公共)-就职单位类型实例不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getEntityId(), "B1-3批量查询可分配责任人就职记录(边界)-D1-3查询就职记录列表(公共)-就职单位对象实例ID不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getIsTransaction(), "B1-3批量查询可分配责任人就职记录(边界)-D1-3查询就职记录列表(公共)-是否异动不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSubjectLifeCycle(), "B1-3批量查询可分配责任人就职记录(边界)-D1-3查询就职记录列表(公共)-主体生命周期不能为空", false);
        Assert.isNull(queryInductionRecordListComReqDto.getSpaceId(), "B1-3批量查询可分配责任人就职记录(边界)-D1-3查询就职记录列表(公共)-创建于空间ID不能为空", false);
        queryInductionRecordListComRespDto = fwBaseInductionRecordClient.queryInductionRecordListCom(queryInductionRecordListComReqDto).getData();


//步骤2: D3-6批量查虚拟组织成员(边界) - batchQueryVirtualOrgMemberBorder
        BatchQueryVirtualOrgMemberBorderRespDto batchQueryVirtualOrgMemberBorderRespDto = null;
        BatchQueryVirtualOrgMemberBorderReqDto batchQueryVirtualOrgMemberBorderReqDto = new BatchQueryVirtualOrgMemberBorderReqDto();
        batchQueryVirtualOrgMemberBorderReqDto.setTableTypeCode("OMS_TARGET_OBJECTIVE");//sourceId:220960_1
        batchQueryVirtualOrgMemberBorderReqDto.setRoleCode("INITIATOR");//CUSTOM_CONVENTION//sourceId:220982_1
        batchQueryVirtualOrgMemberBorderReqDto.setIsPersonCharge("TRUE");//sourceId:220983_1
        if (reqDto != null) {
            batchQueryVirtualOrgMemberBorderReqDto.setVirtualOrgMemberList(reqDto.getVirtualOrgMemberList());//sourceId:220959_1
        }

        /*D3-6批量查虚拟组织成员(边界)[2944]   */
        Assert.isNull(batchQueryVirtualOrgMemberBorderReqDto.getTableTypeCode(), "B1-3批量查询可分配责任人就职记录(边界)-D3-6批量查虚拟组织成员(边界)-冗余内容表类型编码不能为空", false);
        Assert.isNull(batchQueryVirtualOrgMemberBorderReqDto.getRoleCode(), "B1-3批量查询可分配责任人就职记录(边界)-D3-6批量查虚拟组织成员(边界)-角色标识不能为空", false);
        Assert.isNull(batchQueryVirtualOrgMemberBorderReqDto.getIsPersonCharge(), "B1-3批量查询可分配责任人就职记录(边界)-D3-6批量查虚拟组织成员(边界)-是否负责人不能为空", false);
        batchQueryVirtualOrgMemberBorderRespDto = fwAppVirtualOrgClient.batchQueryVirtualOrgMemberBorder(batchQueryVirtualOrgMemberBorderReqDto).getData();


//步骤3: D1-集合去除已存在员工就职记录数据(公共) - addCollectionRemoveExistingDataCom
        AddCollectionRemoveExistingDataComRespDto addCollectionRemoveExistingDataComRespDto = null;
        if (queryInductionRecordListComRespDto != null) {
            AddCollectionRemoveExistingDataComReqDto addCollectionRemoveExistingDataComReqDto = new AddCollectionRemoveExistingDataComReqDto();
            if (queryInductionRecordListComRespDto != null) {
                addCollectionRemoveExistingDataComReqDto.setOrgInductionRecordList(queryInductionRecordListComRespDto.getOrgInductionRecordList());//sourceId:220953_1
            }
            if (batchQueryVirtualOrgMemberBorderRespDto != null) {
                addCollectionRemoveExistingDataComReqDto.setExistingInductionRecordList(batchQueryVirtualOrgMemberBorderRespDto.getVirtualOrgMemberList().stream().map(item -> item.getVirtualOrgMemberId())
                        .collect(Collectors.toList()));//sourceId:220954_1
            }

            /*D1-集合去除已存在员工就职记录数据(公共)[3931]   */

            addCollectionRemoveExistingDataComRespDto = fwBaseDivineDataClient.addCollectionRemoveExistingDataCom(addCollectionRemoveExistingDataComReqDto).getData();


            addCollectionRemoveExistingDataComRespDto_1 = addCollectionRemoveExistingDataComRespDto;
        }

        BffBatchQueryPrincipalInductionRecordBorderRespDto retData = new BffBatchQueryPrincipalInductionRecordBorderRespDto();
        if (addCollectionRemoveExistingDataComRespDto_1 != null) {
            retData.setOrgInductionRecordList(addCollectionRemoveExistingDataComRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//sourceId:221193_1
        }


        return retData;
    }

    /**
     * B1-3查询部门下直属就职记录列表(边界)[3937]
     * gen by moon at 10/12/2023, 4:21:52 PM
     */
    @Trace(operationName = "B1-3查询部门下直属就职记录列表(边界)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryDeptInductionRecordListBorderRespDto queryDeptInductionRecordListBorder(BffQueryDeptInductionRecordListBorderReqDto reqDto) {


        QueryDeptDirectlyInductionRecordListRespDto queryDeptDirectlyInductionRecordListRespDto_1 = null;
//步骤0: D1-3查询部门下直属就职记录列表 - queryDeptDirectlyInductionRecordList
        QueryDeptDirectlyInductionRecordListRespDto queryDeptDirectlyInductionRecordListRespDto = null;
        QueryDeptDirectlyInductionRecordListReqDto queryDeptDirectlyInductionRecordListReqDto = new QueryDeptDirectlyInductionRecordListReqDto();
        if (reqDto != null) {
            queryDeptDirectlyInductionRecordListReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:377823_1
            queryDeptDirectlyInductionRecordListReqDto.setIsDeputy(reqDto.getIsDeputy());//SimpleFieldAssign//sourceId:377824_1
        }

        /*D1-3查询部门下直属就职记录列表[4839]   */
        Assert.isNull(queryDeptDirectlyInductionRecordListReqDto.getDeptId(), "B1-3查询部门下直属就职记录列表(边界)-D1-3查询部门下直属就职记录列表-部门ID不能为空", false);
        queryDeptDirectlyInductionRecordListRespDto = fwBaseInductionRecordClient.queryDeptDirectlyInductionRecordList(queryDeptDirectlyInductionRecordListReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        queryDeptDirectlyInductionRecordListRespDto_1 = queryDeptDirectlyInductionRecordListRespDto;

        BffQueryDeptInductionRecordListBorderRespDto retData = new BffQueryDeptInductionRecordListBorderRespDto();
        if (queryDeptDirectlyInductionRecordListRespDto_1 != null) {
            retData.setOrgInductionRecordList(queryDeptDirectlyInductionRecordListRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:377827_1
        }


        return retData;
    }

    /**
     * B1-设置主岗(管理)[7427]
     * gen by moon at 9/21/2023, 12:48:22 PM
     */
    @Trace(operationName = "B1-设置主岗(管理)")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffImplementSetMajorPositionRespDto implementSetMajorPosition(BffImplementSetMajorPositionReqDto reqDto) {


        //步骤0: D1-设置主岗(公共) - implementSetMajorPositionCom
        ImplementSetMajorPositionComRespDto implementSetMajorPositionComRespDto = null;
        ImplementSetMajorPositionComReqDto implementSetMajorPositionComReqDto = new ImplementSetMajorPositionComReqDto();
        implementSetMajorPositionComReqDto.setIsMainInduction("TRUE");//sourceId:1125721_1
        if (reqDto != null) {
            implementSetMajorPositionComReqDto.setInductionRecordId(reqDto.getInductionRecordId());//SimpleFieldAssign//sourceId:1125720_1
        }

        /*D1-设置主岗(公共)[7426]   */
        Assert.isNull(implementSetMajorPositionComReqDto.getInductionRecordId(), "B1-设置主岗(管理)-D1-设置主岗(公共)-就职记录ID不能为空", false);
        Assert.isNull(implementSetMajorPositionComReqDto.getIsMainInduction(), "B1-设置主岗(管理)-D1-设置主岗(公共)-是否主岗不能为空", false);
        implementSetMajorPositionComRespDto = fwBaseInductionRecordClient.implementSetMajorPositionCom(implementSetMajorPositionComReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        BffImplementSetMajorPositionRespDto retData = new BffImplementSetMajorPositionRespDto();


        return retData;
    }

    /**
     * B1查询基层向上汇报对象列表[9577]
     * gen by moon at 5/15/2024, 3:55:27 PM
     */
    @Trace(operationName = "B1查询基层向上汇报对象列表")
    @Tags({@Tag(key = "参数", value = "arg[0]"),
            @Tag(key = "返回值", value = "returnedObj")})
    @Override
    public BffQueryBasicUpReportLeaderListRespDto queryBasicUpReportLeaderList(BffQueryBasicUpReportLeaderListReqDto reqDto) {


        ObtainBasicUpReportLeaderRespDto obtainBasicUpReportLeaderRespDto_1 = null;
//步骤0: D1获取基层向上汇报对象 - obtainBasicUpReportLeader
        ObtainBasicUpReportLeaderRespDto obtainBasicUpReportLeaderRespDto = null;
        ObtainBasicUpReportLeaderReqDto obtainBasicUpReportLeaderReqDto = new ObtainBasicUpReportLeaderReqDto();
        if (reqDto != null) {
            obtainBasicUpReportLeaderReqDto.setDeptId(reqDto.getDeptId());//SimpleFieldAssign//sourceId:1798491_1
        }

        /*D1获取基层向上汇报对象[9576]   */
        Assert.isNull(obtainBasicUpReportLeaderReqDto.getDeptId(), "B1查询基层向上汇报对象列表-D1获取基层向上汇报对象-部门ID不能为空", false);
        obtainBasicUpReportLeaderRespDto = fwBaseInductionRecordClient.obtainBasicUpReportLeader(obtainBasicUpReportLeaderReqDto).getData()/*vcase invoke 跨dubbo调用;*/;


        obtainBasicUpReportLeaderRespDto_1 = obtainBasicUpReportLeaderRespDto;

        BffQueryBasicUpReportLeaderListRespDto retData = new BffQueryBasicUpReportLeaderListRespDto();
        if (obtainBasicUpReportLeaderRespDto_1 != null) {
            retData.setOrgInductionRecordList(obtainBasicUpReportLeaderRespDto_1.getOrgInductionRecordList().stream().map(item -> BeanUtil.toBean(item, BffOrgInductionRecordDto.class)).collect(Collectors.toList()));//objList-to-objLists//sourceId:1798494_1
        }


        return retData;
    }
    //
}
